aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:41:37 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 07:41:37 +0000
commit83bce58acfda6821af22ffc26edaf240f0f5bfe3 (patch)
tree12ff8e708f4931626f6b2e8a0115220c99860a56
parent953fdd3e112f40fe74cc5ac53ad8efd6a57550d3 (diff)
downloadelgg-83bce58acfda6821af22ffc26edaf240f0f5bfe3.tar.gz
elgg-83bce58acfda6821af22ffc26edaf240f0f5bfe3.tar.bz2
Touch ups for diagnostics plugin
git-svn-id: http://code.elgg.org/elgg/trunk@8422 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/diagnostics/actions/download.php31
-rw-r--r--mod/diagnostics/views/default/admin/utilities/diagnostics.php28
-rw-r--r--mod/diagnostics/views/default/diagnostics/forms/download.php2
3 files changed, 23 insertions, 38 deletions
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
index a79527f78..97775c92e 100644
--- a/mod/diagnostics/actions/download.php
+++ b/mod/diagnostics/actions/download.php
@@ -1,21 +1,18 @@
<?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;
diff --git a/mod/diagnostics/views/default/admin/utilities/diagnostics.php b/mod/diagnostics/views/default/admin/utilities/diagnostics.php
index 9b5da95f7..c17e67c28 100644
--- a/mod/diagnostics/views/default/admin/utilities/diagnostics.php
+++ b/mod/diagnostics/views/default/admin/utilities/diagnostics.php
@@ -3,7 +3,7 @@
$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');
@@ -14,8 +14,8 @@ if (elgg_get_config('debug')) {
// 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 {
@@ -24,21 +24,7 @@ if (elgg_get_config('debug')) {
}
// 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
diff --git a/mod/diagnostics/views/default/diagnostics/forms/download.php b/mod/diagnostics/views/default/diagnostics/forms/download.php
index 7f48a7608..e80d42a39 100644
--- a/mod/diagnostics/views/default/diagnostics/forms/download.php
+++ b/mod/diagnostics/views/default/diagnostics/forms/download.php
@@ -3,6 +3,8 @@
* Elgg diagnostics
*
* @package ElggDiagnostics
+ *
+ * @deprecated 1.8
*/
elgg_deprecated_notice("Use elgg_view_form('diagnostics/download') instead of elgg_view('diagnostics/forms/download')", 1.8);