mirror of
https://github.com/moodle/moodle.git
synced 2025-04-23 09:23:09 +02:00
$CFG->tabselectedtofront is out. Part of MDL-8746
Merged from MOODLE_18_STABLE
This commit is contained in:
parent
e8858fb1cb
commit
77d08333a8
@ -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'));
|
||||
|
||||
|
@ -627,6 +627,11 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007021501) {
|
||||
/// delete removed setting from config
|
||||
unset_config('tabselectedtofront');
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user