aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-01-12 16:15:16 +0100
committerSem <sembrestels@riseup.net>2012-01-12 16:15:16 +0100
commitcc544cfa2086e418318a899ffd550adfb744c7ba (patch)
tree6c04fbe2e3df67513aa76803cb8d05c105ba219b /mod/diagnostics
parente7d64510ebd823f186282e2b80780295bcca1b79 (diff)
parent68e4829ac0959d86c651e7ed6dc255c39694c8af (diff)
downloadelgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.gz
elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.bz2
Merge Elgg 1.8.3.
Diffstat (limited to 'mod/diagnostics')
-rw-r--r--mod/diagnostics/languages/en.php66
-rw-r--r--mod/diagnostics/start.php2
-rw-r--r--mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php17
-rw-r--r--mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php38
4 files changed, 38 insertions, 85 deletions
diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php
index c4e337b50..54859941d 100644
--- a/mod/diagnostics/languages/en.php
+++ b/mod/diagnostics/languages/en.php
@@ -1,71 +1,45 @@
<?php
- /**
- * Elgg diagnostics language pack.
- *
- * @package ElggDiagnostics
- */
-
- $english = array(
-
- 'admin:develop_utilities:diagnostics' => 'System Diagnostics',
- 'diagnostics' => 'System diagnostics',
- 'diagnostics:report' => 'Diagnostics Report',
- 'diagnostics:unittester' => 'Unit Tests',
-
- 'diagnostics:description' => 'The following diagnostic report is useful for diagnosing any problems with Elgg, and should be attached to any bug reports you file.',
- 'diagnostics:unittester:description' => 'The following are diagnostic tests which are registered by plugins and may be performed in order to debug parts of the Elgg framework.',
-
- 'diagnostics:unittester:description' => 'Unit tests check Elgg Core for broken or buggy APIs.',
- 'diagnostics:unittester:debug' => 'The site must be in debug mode to run unit tests.',
- 'diagnostics:unittester:warning' => 'WARNING: These tests can leave behind debugging objects in your database.<br />DO NOT USE ON A PRODUCTION SITE!',
-
- 'diagnostics:test:executetest' => 'Execute test',
- 'diagnostics:test:executeall' => 'Execute All',
- 'diagnostics:unittester:notests' => 'Sorry, there are no unit test modules currently installed.',
- 'diagnostics:unittester:testnotfound' => 'Sorry, the report could not be generated because that test was not found',
-
- 'diagnostics:unittester:testresult:nottestclass' => 'FAIL - Result not a test class',
- 'diagnostics:unittester:testresult:fail' => 'FAIL',
- 'diagnostics:unittester:testresult:success' => 'SUCCESS',
-
- 'diagnostics:unittest:example' => 'Example unit test, only available in debug mode.',
-
- 'diagnostics:unittester:report' => 'Test report for %s',
-
- 'diagnostics:download' => 'Download',
-
-
- 'diagnostics:header' => '========================================================================
+/**
+ * Elgg diagnostics language pack.
+ *
+ * @package ElggDiagnostics
+ */
+
+$english = array(
+ 'admin:administer_utilities:diagnostics' => 'System Diagnostics',
+ 'diagnostics' => 'System diagnostics',
+ 'diagnostics:report' => 'Diagnostics Report',
+ 'diagnostics:description' => 'The following diagnostic report can be useful for diagnosing problems with Elgg. The developers of Elgg may request that you attach it to a bug report.',
+ 'diagnostics:download' => 'Download',
+ 'diagnostics:header' => '========================================================================
Elgg Diagnostic Report
Generated %s by %s
========================================================================
',
- 'diagnostics:report:basic' => '
+ 'diagnostics:report:basic' => '
Elgg Release %s, version %s
------------------------------------------------------------------------',
- 'diagnostics:report:php' => '
+ 'diagnostics:report:php' => '
PHP info:
%s
------------------------------------------------------------------------',
- 'diagnostics:report:plugins' => '
+ 'diagnostics:report:plugins' => '
Installed plugins and details:
%s
------------------------------------------------------------------------',
- 'diagnostics:report:md5' => '
+ 'diagnostics:report:md5' => '
Installed files and checksums:
%s
------------------------------------------------------------------------',
- 'diagnostics:report:globals' => '
+ 'diagnostics:report:globals' => '
Global variables:
%s
------------------------------------------------------------------------',
+);
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
+add_translation("en", $english);
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index 0bcc08bd9..55842800a 100644
--- a/mod/diagnostics/start.php
+++ b/mod/diagnostics/start.php
@@ -13,7 +13,7 @@ elgg_register_event_handler('init', 'system', 'diagnostics_init');
function diagnostics_init() {
// Add admin menu item
- elgg_register_admin_menu_item('develop', 'diagnostics', 'develop_utilities');
+ elgg_register_admin_menu_item('administer', 'diagnostics', 'administer_utilities');
// Register some actions
$file = elgg_get_plugins_path() . "diagnostics/actions/download.php";
diff --git a/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php
new file mode 100644
index 000000000..c7ff3d5fc
--- /dev/null
+++ b/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php
@@ -0,0 +1,17 @@
+<?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>';
+
+echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings'));
diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
deleted file mode 100644
index 89e235279..000000000
--- a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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'));