aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/views/default/admin
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 22:39:25 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 22:39:25 +0000
commitdcba493d8defdeb9ab6f41bf07826474bc41e9a6 (patch)
treee25c5cf752750bd021cef50a9e0c48810c0d51a9 /mod/diagnostics/views/default/admin
parent7355326146c6dd1f3e54f023510095c5fb0eb51c (diff)
downloadelgg-dcba493d8defdeb9ab6f41bf07826474bc41e9a6.tar.gz
elgg-dcba493d8defdeb9ab6f41bf07826474bc41e9a6.tar.bz2
updated the diagnostics plugin to use the new admin backend
git-svn-id: http://code.elgg.org/elgg/trunk@7762 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/diagnostics/views/default/admin')
-rw-r--r--mod/diagnostics/views/default/admin/utilities/diagnostics.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/mod/diagnostics/views/default/admin/utilities/diagnostics.php b/mod/diagnostics/views/default/admin/utilities/diagnostics.php
new file mode 100644
index 000000000..44e6fa17b
--- /dev/null
+++ b/mod/diagnostics/views/default/admin/utilities/diagnostics.php
@@ -0,0 +1,35 @@
+<?php
+
+
+$title = elgg_view_title(elgg_echo('diagnostics'));
+
+$diagnostics = "<h3>".elgg_echo('diagnostics:report')."</h3>";
+$diagnostics .= elgg_echo('diagnostics:description');
+$diagnostics .= elgg_view('diagnostics/forms/download');
+
+// unit tests
+$unit_tests = "<h3>".elgg_echo('diagnostics:unittester')."</h3>";
+$unit_tests .= "<p>" . elgg_echo('diagnostics:unittester:description') . "</p>";
+$unit_tests .= "<p>" . elgg_echo('diagnostics:unittester:warning') . "</p>";
+
+if (isset($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-submit-button',
+ );
+ $unit_tests .= elgg_view('output/url', $params);
+} else {
+ // no tests when not in debug mode
+ $unit_tests .= elgg_echo('diagnostics:unittester:debug');
+}
+
+// display admin body
+echo <<<HTML
+$title
+<div class="admin_settings diagnostics">
+ $diagnostics
+ $unit_tests
+</div>
+HTML;