$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'));
}
}
+ if ($result && $oldversion < 2007021501) {
+ /// delete removed setting from config
+ unset_config('tabselectedtofront');
+ }
+
return $result;
}
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();
// 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