2009-10-15 02:19:51 +00:00
|
|
|
<?PHP
|
2009-10-31 22:02:05 +00:00
|
|
|
// dbperformance.php - shows latest ADOdb stats for the current server
|
2003-11-19 08:15:23 +00:00
|
|
|
|
2009-10-31 22:02:05 +00:00
|
|
|
// disable moodle specific debug messages and any errors in output
|
|
|
|
define('NO_DEBUG_DISPLAY', true);
|
|
|
|
|
|
|
|
require_once('../config.php');
|
2003-11-19 08:15:23 +00:00
|
|
|
|
2008-05-30 21:16:16 +00:00
|
|
|
error('TODO: rewrite db perf code'); // TODO: rewrite
|
|
|
|
|
2006-09-25 19:05:04 +00:00
|
|
|
|
2006-03-06 10:02:59 +00:00
|
|
|
$topframe = optional_param('topframe', 0, PARAM_BOOL);
|
|
|
|
$bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
|
|
|
|
$do = optional_param('do', '', PARAM_ALPHA);
|
2005-06-15 12:31:09 +00:00
|
|
|
|
2003-11-19 08:15:23 +00:00
|
|
|
require_login();
|
|
|
|
|
2008-05-02 04:37:02 +00:00
|
|
|
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
|
2003-11-19 08:15:23 +00:00
|
|
|
|
|
|
|
$strdatabaseperformance = get_string("databaseperformance");
|
|
|
|
$stradministration = get_string("administration");
|
|
|
|
$site = get_site();
|
|
|
|
|
2005-06-15 12:31:09 +00:00
|
|
|
if (!empty($topframe)) {
|
2010-01-16 15:39:56 +00:00
|
|
|
$PAGE->set_url('/admin/dbperformance.php');
|
|
|
|
$PAGE->navbar->add($stradministration, new moodle_url('/admin/index.php'));
|
2009-09-03 05:11:33 +00:00
|
|
|
$PAGE->navbar->add($strdatabaseperformance);
|
|
|
|
$PAGE->set_title("$site->shortname: $strdatabaseperformance");
|
|
|
|
$PAGE->set_heading($site->fullname);
|
|
|
|
echo $OUTPUT->header();
|
2003-11-19 08:15:23 +00:00
|
|
|
exit;
|
|
|
|
}
|