From c0a1aae3e2ae8814cf88c859fc549141252138ba Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 25 Sep 2006 18:21:59 +0000 Subject: [PATCH] admin/upgradesettings.php is now proper hidden external page with correct breadcrums ;-) --- admin/settings/top.php | 11 ++++++++--- admin/upgradesettings.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/admin/settings/top.php b/admin/settings/top.php index ecd755b8b7..4c6fa4cc09 100644 --- a/admin/settings/top.php +++ b/admin/settings/top.php @@ -1,10 +1,15 @@ add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php")); + + // hidden upgrade script +$ADMIN->add('root', new admin_externalpage('upgradesettings', get_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true)); + $ADMIN->add('root', new admin_category('users', get_string('users','admin'))); $ADMIN->add('root', new admin_category('courses', get_string('courses','admin'))); $ADMIN->add('root', new admin_category('location', get_string('location','admin'))); diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index b561f20b74..06f0b29951 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -7,7 +7,7 @@ require_once('../config.php'); require_once($CFG->libdir.'/adminlib.php'); $adminroot = admin_get_root(); -admin_externalpage_setup('adminnotifications', $adminroot); // we pretend to be the adminnotifications page... don't wanna show up in the menu :) +admin_externalpage_setup('upgradesettings', $adminroot); // now hidden page // a caveat: we're depending on only having one admin access this page at once. why? the following line // (the function call to find_new_settings) must have the EXACT SAME RETURN VALUE both times that this -- 2.39.5