blob: 9a7b6619119531cf0820104f6d4d0300b2fec7bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?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');
// 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));
|