From: stronk7 Date: Mon, 19 Mar 2007 17:21:31 +0000 (+0000) Subject: $CFG->tabselectedtofront is out. Part of MDL-8746 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=77d08333a8ac8c8d6d1229e298de3fe1d816b0f7;p=moodle.git $CFG->tabselectedtofront is out. Part of MDL-8746 Merged from MOODLE_18_STABLE --- diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index b0289ef2f0..d2149bef64 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -10,7 +10,6 @@ $temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allow $temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1)); $temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0)); -$temp->add(new admin_setting_configcheckbox('tabselectedtofront', get_string('tabselectedtofronttext', 'admin'), get_string('tabselectedtofront', 'admin'), 0)); $ADMIN->add('themes', $temp); $ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php')); diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d8b938cae9..f02f7f3fbe 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -627,6 +627,11 @@ function xmldb_main_upgrade($oldversion=0) { } } + if ($result && $oldversion < 2007021501) { + /// delete removed setting from config + unset_config('tabselectedtofront'); + } + return $result; } diff --git a/lib/weblib.php b/lib/weblib.php index e59f3347b9..2ffe33b069 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5563,27 +5563,6 @@ class tabobject { function print_tabs($tabrows, $selected=NULL, $inactive=NULL, $activated=NULL, $return=false) { global $CFG; -/// Bring the row with the selected tab to the front - if (!empty($CFG->tabselectedtofront) and ($selected !== NULL) ) { - $found = false; - $frontrows = array(); - $rearrows = array(); - foreach ($tabrows as $row) { - if ($found) { - $rearrows[] = $row; - } else { - foreach ($row as $tab) { - if ($found) { - continue; - } - $found = ($selected == $tab->id); - } - $frontrows[] = $row; - } - } - $tabrows = array_merge($rearrows,$frontrows); - } - /// $inactive must be an array if (!is_array($inactive)) { $inactive = array(); diff --git a/version.php b/version.php index ca760ce15c..a0e5739703 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2007021500; // YYYYMMDD = date + $version = 2007021501; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name