1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Admin UI user preferences handling synchronized with latest changes

This commit is contained in:
secretr
2010-11-02 11:41:38 +00:00
parent cf11ca5ebc
commit 5324e982ea

View File

@@ -2181,8 +2181,9 @@ class e_admin_controller_ui extends e_admin_controller
*/ */
public function getUserPref() public function getUserPref()
{ {
global $user_pref; //global $user_pref;
return vartrue($user_pref['admin_cols_'.$this->getTableName()], array()); // return vartrue($user_pref['admin_cols_'.$this->getTableName()], array());
return e107::getUser()->getPref('admin_cols_'.$this->getTableName(), array());
} }
/** /**
@@ -2191,10 +2192,15 @@ class e_admin_controller_ui extends e_admin_controller
*/ */
public function setUserPref($new) public function setUserPref($new)
{ {
global $user_pref; //global $user_pref;
$user_pref['admin_cols_'.$this->getTableName()] = $new; //e107::getUser()->getConfig()->setData($new);
//$user_pref['admin_cols_'.$this->getTableName()] = $new;
//$this->fieldpref = $new;
//return save_prefs('user');
$this->fieldpref = $new; $this->fieldpref = $new;
return save_prefs('user'); return e107::getUser()->getConfig()
->set('admin_cols_'.$this->getTableName(), $new)
->save();
} }
/** /**