mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +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());
|
$posted = $this->getPosted('e-columns', array());
|
||||||
foreach ($this->getFields() as $field => $attr)
|
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;
|
$cols[] = $field;
|
||||||
continue;
|
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);
|
$this->setUserPref($cols, $this->fieldPrefName);
|
||||||
|
e107::getMessage()->addDebug("User Field Preferences Saved: ".print_a($cols,true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user