function getPreferences() { if (!empty($this->_prefs->_method)) { if ($this->_prefs->_method == 'ADODB') { // FIXME: strange why this should be needed... include_once "lib/WikiUser/Db.php"; include_once "lib/WikiUser/AdoDb.php"; return _AdoDbPassUser::getPreferences(); } elseif ($this->_prefs->_method == 'SQL') { include_once "lib/WikiUser/Db.php"; include_once "lib/WikiUser/PearDb.php"; return _PearDbPassUser::getPreferences(); } elseif ($this->_prefs->_method == 'PDO') { include_once "lib/WikiUser/Db.php"; include_once "lib/WikiUser/PdoDb.php"; return _PdoDbPassUser::getPreferences(); } } // We don't necessarily have to read the cookie first. Since // the user has a password, the prefs stored in the homepage // cannot be arbitrarily altered by other Bogo users. _AnonUser::getPreferences(); // User may have deleted cookie, retrieve from his // PersonalPage if there is one. if (!empty($this->_HomePagehandle)) { if ($restored_from_page = $this->_prefs->retrieve($this->_HomePagehandle->get('pref'))) { $updated = $this->_prefs->updatePrefs($restored_from_page, 'init'); //$this->_prefs = new UserPreferences($restored_from_page); return $this->_prefs; } } return $this->_prefs; }