MDL-14679 towards /admin/settings conversion

This commit is contained in:
skodak
2008-05-31 09:54:12 +00:00
parent 668fc89a88
commit 823e64a78c
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('modsettings', get_string('activities')));
$ADMIN->add('modsettings', new admin_page_managemods());
if ($modules = get_records('modules')) {
if ($modules = $DB->get_records('modules')) {
$modulebyname = array();
foreach ($modules as $module) {
@@ -41,7 +41,7 @@ if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('blocksettings', get_string('blocks')));
$ADMIN->add('blocksettings', new admin_page_manageblocks());
$ADMIN->add('blocksettings', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
if (!empty($CFG->blocks_version) and $blocks = get_records('block')) {
if (!empty($CFG->blocks_version) and $blocks = $DB->get_records('block')) {
$blockbyname = array();
foreach ($blocks as $block) {
+1 -1
View File
@@ -69,7 +69,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
'all' => 'All courses',
'requested' => 'Requested courses')));
$temp->add(new admin_setting_configcheckbox('restrictbydefault', get_string('restrictbydefault', 'admin'), get_string('configrestrictbydefault', 'admin'), 0));
if (!$options = get_records("modules")) {
if (!$options = $DB->get_records('modules')) {
$options = array();
}
$options2 = array();
+1 -1
View File
@@ -4087,7 +4087,7 @@ function admin_externalpage_print_footer() {
* @return reference
*/
function &admin_get_root($reload=false, $requirefulltree=true) {
global $CFG;
global $CFG, $DB;
static $ADMIN = NULL;