]> git.mjollnir.org Git - moodle.git/commitdiff
$CFG->tabselectedtofront is out. Part of MDL-8746
authorstronk7 <stronk7>
Mon, 19 Mar 2007 17:21:31 +0000 (17:21 +0000)
committerstronk7 <stronk7>
Mon, 19 Mar 2007 17:21:31 +0000 (17:21 +0000)
Merged from MOODLE_18_STABLE

admin/settings/appearance.php
lib/db/upgrade.php
lib/weblib.php
version.php

index b0289ef2f0f4c1135280cfbfd38204f7c4cda8a0..d2149bef6489d1981d3987b7c26770d7a26acacd 100644 (file)
@@ -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'));
 
index d8b938cae97fc1442763aa55e75e36c7ccfc78f3..f02f7f3fbea394d980bf9c7ed821295f7afbef03 100644 (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;
 
 }
index e59f3347b9d3208883dbbb53167e11ed8fae33d8..2ffe33b06923c91fdb3a2c512c855f2509c79e8a 100644 (file)
@@ -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();
index ca760ce15c2c9a047d554c81f00e1e7e75ee540f..a0e5739703d80ccd84021af707db6fa299247967 100644 (file)
@@ -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