From: skodak Date: Mon, 25 Sep 2006 18:29:50 +0000 (+0000) Subject: XMLDB editor now has admin-tree block X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fa323030facd0040bbb8598bfd7b1e14ba800ce2;p=moodle.git XMLDB editor now has admin-tree block --- diff --git a/admin/xmldb/index.php b/admin/xmldb/index.php index 91632a3818..1bb29e77c1 100644 --- a/admin/xmldb/index.php +++ b/admin/xmldb/index.php @@ -51,6 +51,9 @@ /// stored there MUST be declared before in order to avoid /// getting "incomplete" objects require_once('../../config.php'); + require_once($CFG->libdir.'/adminlib.php'); + $adminroot = admin_get_root(); + admin_externalpage_setup('xmldbeditor', $adminroot); /// Add other used libraries require_once($CFG->libdir . '/xmlize.php'); @@ -77,9 +80,6 @@ require_login(); require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)); -/// Fetch all the needed strings - $stradministration = get_string('administration'); - /// Body of the script, based on action, we delegate the work $action = optional_param ('action', 'main_view', PARAM_ALPHAEXT); @@ -103,13 +103,11 @@ global $standard_javascript; $standard_javascript = $CFG->javascript; // Save original javascript file $CFG->javascript = $CFG->dirroot.'/admin/xmldb/javascript.php'; //Use our custom javascript code - /// Go with standard header - print_header("$site->shortname: XMLDB", - "$site->fullname", - "$stradministration -> XMLDB"); + /// Go with standard admin header + admin_externalpage_print_header($adminroot); print_heading($xmldb_action->getTitle()); echo $xmldb_action->getOutput(); - print_footer(); + admin_externalpage_print_footer($adminroot); break; case ACTION_GENERATE_XML: header('Content-type: application/xhtml+xml');