From 5324e982eabb89253fde95f3e1771178e0508b1c Mon Sep 17 00:00:00 2001 From: secretr Date: Tue, 2 Nov 2010 11:41:38 +0000 Subject: [PATCH] Admin UI user preferences handling synchronized with latest changes --- e107_handlers/admin_ui.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index a347fa12d..3ad607dd1 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -2181,8 +2181,9 @@ class e_admin_controller_ui extends e_admin_controller */ public function getUserPref() { - global $user_pref; - return vartrue($user_pref['admin_cols_'.$this->getTableName()], array()); + //global $user_pref; + // 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) { - global $user_pref; - $user_pref['admin_cols_'.$this->getTableName()] = $new; + //global $user_pref; + //e107::getUser()->getConfig()->setData($new); + //$user_pref['admin_cols_'.$this->getTableName()] = $new; + //$this->fieldpref = $new; + //return save_prefs('user'); $this->fieldpref = $new; - return save_prefs('user'); + return e107::getUser()->getConfig() + ->set('admin_cols_'.$this->getTableName(), $new) + ->save(); } /**