$CFG->tabselectedtofront is now out. Part of MDL-8746
This commit is contained in:
@@ -627,6 +627,11 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007021501) {
|
||||
/// delete removed setting from config
|
||||
unset_config('tabselectedtofront');
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user