aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'mod/diagnostics')
-rw-r--r--mod/diagnostics/actions/download.php34
-rw-r--r--mod/diagnostics/index.php40
-rw-r--r--mod/diagnostics/languages/en.php67
-rw-r--r--mod/diagnostics/manifest.xml25
-rw-r--r--mod/diagnostics/start.php174
-rw-r--r--mod/diagnostics/testreport.php43
-rw-r--r--mod/diagnostics/unittester.php41
-rw-r--r--mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php17
-rw-r--r--mod/diagnostics/views/default/diagnostics/forms/download.php12
-rw-r--r--mod/diagnostics/views/default/diagnostics/runalltests.php13
-rw-r--r--mod/diagnostics/views/default/diagnostics/test.php27
-rw-r--r--mod/diagnostics/views/default/diagnostics/testresult.php40
12 files changed, 117 insertions, 416 deletions
diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php
index 628d19115..97775c92e 100644
--- a/mod/diagnostics/actions/download.php
+++ b/mod/diagnostics/actions/download.php
@@ -1,22 +1,18 @@
<?php
- /**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
+/**
+ * Elgg diagnostics
+ *
+ * @package ElggDiagnostics
+ */
- admin_gatekeeper();
-
- $output = sprintf(elgg_echo('diagnostics:header'), date('r'), $_SESSION['user']->name);
- $output = trigger_plugin_hook('diagnostics:report', 'all', 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));
+$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);
- echo $output;
-?> \ No newline at end of file
+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;
diff --git a/mod/diagnostics/index.php b/mod/diagnostics/index.php
deleted file mode 100644
index e77d004a8..000000000
--- a/mod/diagnostics/index.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-admin_gatekeeper();
-set_context('admin');
-
-// Set admin user for user block
-set_page_owner($_SESSION['guid']);
-
-// system diagnostics
-$body = elgg_view_title(elgg_echo('diagnostics'));
-$body .= elgg_view('page_elements/contentwrapper', array('body' =>
- elgg_echo('diagnostics:description') . elgg_view('diagnostics/forms/download'))
-);
-
-// unit tests
-$body .= elgg_view_title(elgg_echo('diagnostics:unittester'));
-if (isset($CONFIG->debug)) {
- // create a button to run tests
- $js = "onclick=\"window.location='{$CONFIG->wwwroot}engine/tests/suite.php'\"";
- $params = array('type' => 'button', 'value' => elgg_echo('diagnostics:test:executeall'), 'js' => $js);
- $button = elgg_view('input/button', $params);
-} else {
- // no tests when not in debug mode
- $button = elgg_echo('diagnostics:unittester:debug');
-}
-$body .= elgg_view('page_elements/contentwrapper', array('body' =>
- elgg_echo('diagnostics:unittester:description') . "<br />$button")
-);
-
-// create page
-page_draw(elgg_echo('diagnostics'), elgg_view_layout("two_column_left_sidebar", '', $body));
diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php
index 2562c10b8..54859941d 100644
--- a/mod/diagnostics/languages/en.php
+++ b/mod/diagnostics/languages/en.php
@@ -1,70 +1,45 @@
<?php
- /**
- * Elgg diagnostics language pack.
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
+/**
+ * Elgg diagnostics language pack.
+ *
+ * @package ElggDiagnostics
+ */
- $english = array(
-
- 'diagnostics' => 'System diagnostics',
- '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 are useful to detect errors introduced by new plugins or modifications to Elgg.',
- 'diagnostics:unittester:debug' => 'The site must be in debug mode to run unit tests.',
-
- '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 .txt',
-
-
- 'diagnostics:header' => '========================================================================
+$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/manifest.xml b/mod/diagnostics/manifest.xml
index b11bd911e..21e847d22 100644
--- a/mod/diagnostics/manifest.xml
+++ b/mod/diagnostics/manifest.xml
@@ -1,10 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider Ltd" />
- <field key="version" value="1.5" />
- <field key="description" value="Elgg diagnostics tool" />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest> \ No newline at end of file
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>Diagnostics</name>
+ <author>Core developers</author>
+ <version>1.8</version>
+ <category>bundled</category>
+ <category>development</category>
+ <category>admin</category>
+ <description>Elgg diagnostics tool</description>
+ <website>http://www.elgg.org/</website>
+ <copyright>See COPYRIGHT.txt</copyright>
+ <license>GNU General Public License version 2</license>
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8</version>
+ </requires>
+</plugin_manifest>
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index 76676c6a4..55842800a 100644
--- a/mod/diagnostics/start.php
+++ b/mod/diagnostics/start.php
@@ -3,90 +3,35 @@
* Elgg diagnostics
*
* @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
*/
+elgg_register_event_handler('init', 'system', 'diagnostics_init');
+
/**
* Initialise the diagnostics tool
- *
*/
-function diagnostics_init()
-{
- global $CONFIG;
+function diagnostics_init() {
- // Register a page handler, so we can have nice URLs
- register_page_handler('diagnostics','diagnostics_page_handler');
+ // Add admin menu item
+ elgg_register_admin_menu_item('administer', 'diagnostics', 'administer_utilities');
// Register some actions
- register_action("diagnostics/download",false, $CONFIG->pluginspath . "diagnostics/actions/download.php");
-}
-
-/**
- * Adding the diagnostics to the admin menu
- *
- */
-function diagnostics_pagesetup()
-{
- if (get_context() == 'admin' && isadminloggedin()) {
- global $CONFIG;
- add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/');
- }
-}
-
-/**
- * Diagnostics page.
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
-function diagnostics_page_handler($page)
-{
- global $CONFIG;
-
- if (isset($page[0]))
- {
- switch ($page[0])
- {
- case 'tests' :
- if ((isset($page[1])) && ($page[1])) {
- switch ($page[1])
- {
- case 'all': break;
- default: set_input('test_func', $page[1]);
- }
-
- include($CONFIG->pluginspath . "diagnostics/testreport.php");
- }
- else
- include($CONFIG->pluginspath . "diagnostics/unittester.php");
- break;
- default: include($CONFIG->pluginspath . "diagnostics/index.php");
- }
- }
- else
- {
- // only interested in one page for now
- include($CONFIG->pluginspath . "diagnostics/index.php");
- }
+ $file = elgg_get_plugins_path() . "diagnostics/actions/download.php";
+ elgg_register_action("diagnostics/download", $file, 'admin');
}
/**
* Generate a basic report.
*
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
+ * @return string
*/
-function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params)
-{
- global $CONFIG;
+function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) {
// Get version information
$version = get_version();
$release = get_version(true);
- $returnvalue .= sprintf(elgg_echo('diagnostics:report:basic'), $release, $version);
+ $returnvalue .= elgg_echo('diagnostics:report:basic', array($release, $version));
return $returnvalue;
}
@@ -94,14 +39,11 @@ function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params)
/**
* Get some information about the plugins installed on the system.
*
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
+ * @return tring
*/
-function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params)
-{
- $returnvalue .= sprintf(elgg_echo('diagnostics:report:plugins'), print_r(get_installed_plugins(), true));
+function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) {
+ // @todo this is a really bad idea because of the new plugin system
+ //$returnvalue .= elgg_echo('diagnostics:report:plugins', array(print_r(elgg_get_plugins(), true)));
return $returnvalue;
}
@@ -112,24 +54,23 @@ function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params)
* @param starting dir $dir
* @param buffer $buffer
*/
-function diagnostics_md5_dir($dir)
-{
- //if (is_file(trim($dir, "/"))) {
- $extensions_allowed = array('.php', '.gif', '.png', '.jpg');
+function diagnostics_md5_dir($dir) {
+ $extensions_allowed = array('.php', '.js', '.css');
$buffer = "";
- if (in_array(strrchr(trim($dir, "/"), '.'), $extensions_allowed))
- {
- //$dir = trim($dir, "/");
- $buffer .= md5_file($dir). " " . trim($dir, "/") . "\n";
- } else if ($handle = opendir($dir)) {
+ if (in_array(strrchr(trim($dir, "/"), '.'), $extensions_allowed)) {
+ $dir = rtrim($dir, "/");
+ $buffer .= md5_file($dir). " " . $dir . "\n";
+ } else if (is_dir($dir)) {
+ $handle = opendir($dir);
while ($file = readdir($handle)) {
-
if (($file != '.') && ($file != '..')) {
$buffer .= diagnostics_md5_dir($dir . $file. "/", $buffer);
}
}
+
+ closedir($handle);
}
return $buffer;
@@ -138,16 +79,12 @@ function diagnostics_md5_dir($dir)
/**
* Get some information about the files installed on a system.
*
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
+ * @return string
*/
-function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params)
-{
- global $CONFIG;
+function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params) {
- $returnvalue .= sprintf(elgg_echo('diagnostics:report:md5'), diagnostics_md5_dir($CONFIG->path));
+ $base_dir = elgg_get_root_path();
+ $returnvalue .= elgg_echo('diagnostics:report:md5', array(diagnostics_md5_dir($base_dir)));
return $returnvalue;
}
@@ -155,33 +92,28 @@ function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params)
/**
* Get some information about the php install
*
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
+ * @return string
*/
-function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params)
-{
- global $CONFIG;
+function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params) {
ob_start();
phpinfo();
$phpinfo = array('phpinfo' => array());
- if(preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER))
+ if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER)) {
- foreach($matches as $match)
- {
- if(strlen($match[1]))
- $phpinfo[$match[1]] = array();
- else if(isset($match[3]))
- $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
- else
- $phpinfo[end(array_keys($phpinfo))][] = $match[2];
+ foreach ($matches as $match) {
+ if (strlen($match[1])) {
+ $phpinfo[$match[1]] = array();
+ } else if(isset($match[3])) {
+ $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
+ } else {
+ $phpinfo[end(array_keys($phpinfo))][] = $match[2];
+ }
+ }
}
-
- $returnvalue .= sprintf(elgg_echo('diagnostics:report:php'), print_r($phpinfo, true));
+ $returnvalue .= elgg_echo('diagnostics:report:php', array(print_r($phpinfo, true)));
return $returnvalue;
}
@@ -189,30 +121,20 @@ function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params)
/**
* Get global variables.
*
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- * @return unknown
+ * @return string
*/
-function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params)
-{
+function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params) {
global $CONFIG;
$output = str_replace($CONFIG->dbpass, '<<DBPASS>>', print_r($GLOBALS, true));
- $returnvalue .= sprintf(elgg_echo('diagnostics:report:globals'), $output);
+ $returnvalue .= elgg_echo('diagnostics:report:globals', array($output));
return $returnvalue;
}
-// Initialise log browser
-register_elgg_event_handler('init','system','diagnostics_init');
-register_elgg_event_handler('pagesetup','system','diagnostics_pagesetup');
-
-register_plugin_hook("diagnostics:report", "all", "diagnostics_basic_hook", 0); // show basics first
-register_plugin_hook("diagnostics:report", "all", "diagnostics_plugins_hook", 2); // Now the plugins
-register_plugin_hook("diagnostics:report", "all", "diagnostics_sigs_hook", 1); // Now the signatures
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_basic_hook", 0); // show basics first
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_plugins_hook", 2); // Now the plugins
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_sigs_hook", 1); // Now the signatures
-register_plugin_hook("diagnostics:report", "all", "diagnostics_globals_hook"); // Global variables
-register_plugin_hook("diagnostics:report", "all", "diagnostics_phpinfo_hook"); // PHP info
-?>
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_globals_hook"); // Global variables
+elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_phpinfo_hook"); // PHP info
diff --git a/mod/diagnostics/testreport.php b/mod/diagnostics/testreport.php
deleted file mode 100644
index 2068ec280..000000000
--- a/mod/diagnostics/testreport.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
- /**
- * Elgg diagnostics - test report
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- admin_gatekeeper();
- set_context('admin');
- // Set admin user for user block
- set_page_owner($_SESSION['guid']);
-
- // Which test are we executing?
- $test_func = get_input('test_func');
-
- $title_txt = sprintf(elgg_echo('diagnostics:unittester:report'), $test_func ? $testfunc : elgg_echo('diagnostics:test:executeall'));
-
- $title = elgg_view_title();
-
- $result = null;
- if ($test_func)
- $result = array(execute_elgg_test($test_func));
- else
- $result = execute_elgg_tests();
-
- if ($result)
- {
- foreach ($result as $r)
- $body .= elgg_view('page_elements/contentwrapper', array('body' =>
- elgg_view('diagnostics/testresult', array('function' => $r['function'], 'result' => $r['result']))
- ));
- }
- else
- $body = elgg_view('page_elements/contentwrapper', array('body' =>
- elgg_echo('diagnostics:unittester:testnotfound' )
- ));
-
- page_draw($title_txt, elgg_view_layout("two_column_left_sidebar", '', $title . $body));
-?> \ No newline at end of file
diff --git a/mod/diagnostics/unittester.php b/mod/diagnostics/unittester.php
deleted file mode 100644
index 8b1993041..000000000
--- a/mod/diagnostics/unittester.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
- /**
- * Elgg diagnostics - unit tester
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- admin_gatekeeper();
- set_context('admin');
- // Set admin user for user block
- set_page_owner($_SESSION['guid']);
-
- $title = elgg_view_title(elgg_echo('diagnostics:unittester'));
-
- $tests = get_available_tests();
- $test_body = "";
- if ($tests)
- {
- foreach ($tests as $func => $desc)
- $test_body .= elgg_view('diagnostics/test', array('function' => $func, 'description' => $desc));
- }
- else
- $test_body = elgg_echo('diagnostics:unittester:notests');
-
- $body = elgg_view('page_elements/contentwrapper', array('body' =>
- elgg_echo('diagnostics:unittester:description') .
- elgg_view('diagnostics/runalltests')
- )
- );
-
- $body .= elgg_view('page_elements/contentwrapper', array('body' =>
- $test_body )
- );
-
-
- page_draw(elgg_echo('diagnostics:unittester'),elgg_view_layout("two_column_left_sidebar", '', $title . $body));
-?> \ No newline at end of file
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/diagnostics/forms/download.php b/mod/diagnostics/views/default/diagnostics/forms/download.php
deleted file mode 100644
index 93d1f12be..000000000
--- a/mod/diagnostics/views/default/diagnostics/forms/download.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
- /**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
- $form_body = elgg_view('input/submit', array('value' => elgg_echo('diagnostics:download')));
- echo elgg_view('input/form', array('body' => $form_body, 'action' => $CONFIG->url . "action/diagnostics/download"));
-?> \ No newline at end of file
diff --git a/mod/diagnostics/views/default/diagnostics/runalltests.php b/mod/diagnostics/views/default/diagnostics/runalltests.php
deleted file mode 100644
index a21c58c80..000000000
--- a/mod/diagnostics/views/default/diagnostics/runalltests.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
- /**
- * Elgg diagnostics - unit tester
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
- $form_body .= elgg_view('input/submit', array('internalname' => 'execute', 'value' => elgg_echo('diagnostics:test:executeall')));
-
- echo elgg_view('input/form', array('action' => $vars['url'] . "pg/diagnostics/tests/all", 'body' => $form_body));
-?> \ No newline at end of file
diff --git a/mod/diagnostics/views/default/diagnostics/test.php b/mod/diagnostics/views/default/diagnostics/test.php
deleted file mode 100644
index 7546e6024..000000000
--- a/mod/diagnostics/views/default/diagnostics/test.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
- /**
- * Elgg diagnostics
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
-
-?>
-<div class="test">
- <div class="test_header">
- <b><?php echo $vars['function']; ?></b>
- </div>
- <div class="test_description">
- <?php echo $vars['description']; ?>
- </div>
- <div class="test_button">
- <?php
-
- $form_body = elgg_view('input/submit', array('internalname' => 'execute', 'value' => elgg_echo('diagnostics:test:executetest')));
-
- echo elgg_view('input/form', array('action' => $vars['url'] . "pg/diagnostics/tests/{$vars['function']}", 'body' => $form_body));
- ?>
- </div>
-</div> \ No newline at end of file
diff --git a/mod/diagnostics/views/default/diagnostics/testresult.php b/mod/diagnostics/views/default/diagnostics/testresult.php
deleted file mode 100644
index 8db769f1d..000000000
--- a/mod/diagnostics/views/default/diagnostics/testresult.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
- /**
- * Elgg diagnostics - test report
- *
- * @package ElggDiagnostics
- * @author Curverider Ltd
- * @link http://elgg.com/
- */
-
- $result = $vars['result'];
-
- $testresult_div = 'fail';
- $successmessage = "";
-
- if (!($result instanceof ElggTestResult))
- {
- $successmessage = elgg_echo('diagnostics:unittester:testresult:nottestclass');
- $result = ElggTestResult::CreateFailResult(elgg_echo('diagnostics:unittester:testresult:fail'));
- }
- else
- {
- if ($result->isSuccess())
- $successmessage = elgg_echo('diagnostics:unittester:testresult:success');
- else
- $successmessage = elgg_echo('diagnostics:unittester:testresult:fail');
- }
-?>
-<div class="testreport">
- <div class="testreport_<?php echo $testresult_div; ?>">
- <div class="testreport_header">
- <p><b><?php echo $vars['function']; ?> : </b><?php echo $successmessage; ?></p>
- </div>
- <div class="testreport_details">
- <?php echo $result->getDetails(); ?>
- </div>
- <div class="testreport_debug">
- <?php echo $result->getDebug(); ?>
- </div>
- </div>
-</div> \ No newline at end of file