<?php
- /**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- */
+/**
+ * Elgg diagnostics
+ *
+ * @package ElggDiagnostics
+ */
- admin_gatekeeper();
+$output = elgg_echo('diagnostics:header', array(date('r'), elgg_get_logged_in_user_entity()->name));
+$output = elgg_trigger_plugin_hook('diagnostics:report', 'system', null, $output);
- $output = elgg_echo('diagnostics:header', array(date('r'), elgg_get_logged_in_user_entity()->name));
- $output = elgg_trigger_plugin_hook('diagnostics:report', 'system', null, $output);
+header("Cache-Control: public");
+header("Content-Description: File Transfer");
+header('Content-disposition: attachment; filename=elggdiagnostic.txt');
+header("Content-Type: text/plain");
+header('Content-Length: ' . strlen($output));
- header("Cache-Control: public");
- header("Content-Description: File Transfer");
- header('Content-disposition: attachment; filename=elggdiagnostic.txt');
- header("Content-Type: text/plain");
- header('Content-Length: '. strlen($output));
-
- echo $output;
- exit;
-?>
\ No newline at end of file
+echo $output;
+exit;
$diagnostics_title = elgg_echo('diagnostics:report');
$diagnostics = elgg_echo('diagnostics:description');
-$diagnostics .= elgg_view('diagnostics/forms/download');
+$diagnostics .= elgg_view_form('diagnostics/download');
// unit tests
$unit_tests_title = elgg_echo('diagnostics:unittester');
// create a button to run tests
$params = array(
'text' => elgg_echo('diagnostics:test:executeall'),
- 'href' => elgg_get_site_url() . 'engine/tests/suite.php',
- 'class' => 'elgg-button-submit',
+ 'href' => 'engine/tests/suite.php',
+ 'class' => 'elgg-button elgg-button-submit',
);
$unit_tests .= elgg_view('output/url', $params);
} else {
}
// display admin body
-echo <<<HTML
-<div class="elgg-module elgg-module-inline">
- <div class="elgg-head">
- <h3>$diagnostics_title</h3>
- </div>
- <div class="elgg-body">
- $diagnostics
- </div>
-</div>
-<div class="elgg-module elgg-module-inline">
- <div class="elgg-head">
- <h3>$unit_tests_title</h3>
- </div>
- <div class="elgg-body">
- $unit_tests
- </div>
-</div>
-HTML;
+
+echo elgg_view_module('inline', $diagnostics_title, $diagnostics);
+
+echo elgg_view_module('inline', $unit_tests_title, $unit_tests);
\ No newline at end of file