aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php')
-rw-r--r--mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
new file mode 100644
index 000000000..89e235279
--- /dev/null
+++ b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Diagnostics admin page
+ */
+
+$diagnostics_title = elgg_echo('diagnostics:report');
+$diagnostics = '<p>' . elgg_echo('diagnostics:description') .'</p>';
+$params = array(
+ 'text' => elgg_echo('diagnostics:download'),
+ 'href' => 'action/diagnostics/download',
+ 'class' => 'elgg-button elgg-button-submit',
+ 'is_action' => true,
+ 'is_trusted' => true,
+);
+$diagnostics .= '<p>' . elgg_view('output/url', $params) . '</p>';
+
+// unit tests
+$unit_tests_title = elgg_echo('diagnostics:unittester');
+$unit_tests .= '<p>' . elgg_echo('diagnostics:unittester:description') . '</p>';
+$unit_tests .= '<p>' . elgg_echo('diagnostics:unittester:warning') . '</p>';
+
+if (elgg_get_config('debug')) {
+ // create a button to run tests
+ $params = array(
+ 'text' => elgg_echo('diagnostics:test:executeall'),
+ 'href' => 'engine/tests/suite.php',
+ 'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
+ );
+ $unit_tests .= '<p>' . elgg_view('output/url', $params) . '</p>';
+} else {
+ // no tests when not in debug mode
+ $unit_tests .= elgg_echo('diagnostics:unittester:debug');
+}
+
+// display admin body
+echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings'));
+echo elgg_view_module('inline', $unit_tests_title, $unit_tests, array('class' => 'elgg-form-settings'));