$CFG->tabselectedtofront is now out. Part of MDL-8746

This commit is contained in:
stronk7
2007-03-19 17:17:54 +00:00
parent 374e173f11
commit a20d27df81
2 changed files with 5 additions and 21 deletions
+5
View File
@@ -627,6 +627,11 @@ function xmldb_main_upgrade($oldversion=0) {
}
}
if ($result && $oldversion < 2007021501) {
/// delete removed setting from config
unset_config('tabselectedtofront');
}
return $result;
}
-21
View File
@@ -5553,27 +5553,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();