Merge branch 'm21_MDL-28110' of git://github.com/danmarsden/moodle into MOODLE_21_STABLE
[moodle.git] / admin / dbperformance.php
blobd48b29a56de627f9c7231d57761e3e0bfc5b0f66
1 <?PHP
2 // dbperformance.php - shows latest ADOdb stats for the current server
4 // disable moodle specific debug messages and any errors in output
5 define('NO_DEBUG_DISPLAY', true);
7 require_once('../config.php');
9 error('TODO: rewrite db perf code'); // TODO: rewrite
12 $topframe = optional_param('topframe', 0, PARAM_BOOL);
13 $bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
14 $do = optional_param('do', '', PARAM_ALPHA);
16 require_login();
18 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
20 $strdatabaseperformance = get_string("databaseperformance");
21 $stradministration = get_string("administration");
22 $site = get_site();
24 if (!empty($topframe)) {
25 $PAGE->set_url('/admin/dbperformance.php');
26 $PAGE->navbar->add($stradministration, new moodle_url('/admin/index.php'));
27 $PAGE->navbar->add($strdatabaseperformance);
28 $PAGE->set_title("$site->shortname: $strdatabaseperformance");
29 $PAGE->set_heading($site->fullname);
30 echo $OUTPUT->header();
31 exit;