mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Admin-UI: Unchecking all the display columns options and saving now clears the user preference and restores the coded default value found in $fieldpref
This commit is contained in:
@@ -3418,16 +3418,18 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
$posted = $this->getPosted('e-columns', array());
|
||||
foreach ($this->getFields() as $field => $attr)
|
||||
{
|
||||
if((vartrue($attr['forced']) || in_array($field, $posted)) && !vartrue($attr['nolist']))
|
||||
if((/*vartrue($attr['forced']) || */ in_array($field, $posted)) && !vartrue($attr['nolist']))
|
||||
{
|
||||
$cols[] = $field;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($cols)
|
||||
// Alow for an empty array to be saved also, to reset to default.
|
||||
if($this->getPosted('etrigger_ecolumns', false)) // Column Save Button
|
||||
{
|
||||
$this->setUserPref($cols, $this->fieldPrefName);
|
||||
e107::getMessage()->addDebug("User Field Preferences Saved: ".print_a($cols,true));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user