mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Fixes #4121 User Column preferences were being ignored when using ajax filtering.
This commit is contained in:
@@ -3025,6 +3025,7 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
$name = (!empty($this->fieldPrefName)) ? strtolower($this->pluginName."_".$this->fieldPrefName) : $this->getTableName();
|
$name = (!empty($this->fieldPrefName)) ? strtolower($this->pluginName."_".$this->fieldPrefName) : $this->getTableName();
|
||||||
|
|
||||||
e107::getMessage()->addDebug("Loading Field Preferences using name: ".$name);
|
e107::getMessage()->addDebug("Loading Field Preferences using name: ".$name);
|
||||||
|
$this->_log("Loading Field Preferences using name: ".$name);
|
||||||
return e107::getUser()->getPref('admin_cols_'.$name, array());
|
return e107::getUser()->getPref('admin_cols_'.$name, array());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3039,7 +3040,10 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
//$user_pref['admin_cols_'.$this->getTableName()] = $new;
|
//$user_pref['admin_cols_'.$this->getTableName()] = $new;
|
||||||
//$this->fieldpref = $new;
|
//$this->fieldpref = $new;
|
||||||
//return save_prefs('user');
|
//return save_prefs('user');
|
||||||
$this->fieldpref = $new;
|
if(!empty($new))
|
||||||
|
{
|
||||||
|
$this->fieldpref = $new;
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($name))
|
if(empty($name))
|
||||||
{
|
{
|
||||||
@@ -3050,7 +3054,9 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
$name = strtolower($this->pluginName."_".$name);
|
$name = strtolower($this->pluginName."_".$name);
|
||||||
}
|
}
|
||||||
|
|
||||||
e107::getMessage()->addDebug("Saving User Field preferences using name: ".$name);
|
$msg = "Saving User Field preferences using name: ".$name;
|
||||||
|
e107::getMessage()->addDebug($msg);
|
||||||
|
$this->_log($msg);
|
||||||
|
|
||||||
return e107::getUser()->getConfig()
|
return e107::getUser()->getConfig()
|
||||||
->set('admin_cols_'.$name, $new)
|
->set('admin_cols_'.$name, $new)
|
||||||
@@ -6085,6 +6091,11 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
*/
|
*/
|
||||||
public function ListAjaxObserver()
|
public function ListAjaxObserver()
|
||||||
{
|
{
|
||||||
|
if($ufieldpref = $this->getUserPref())
|
||||||
|
{
|
||||||
|
$this->fieldpref = $ufieldpref;
|
||||||
|
}
|
||||||
|
|
||||||
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, 0, false, $this->listQry))->loadBatch();
|
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, 0, false, $this->listQry))->loadBatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user