mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 05:11:42 +02:00
Fixes #1766 user password - getModel() issue.
This commit is contained in:
@@ -2770,15 +2770,34 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
$this->_setModel();
|
||||
}
|
||||
|
||||
if($this->getQuery('action') == 'list') // allow for use of getModel() at all times.
|
||||
{
|
||||
return $this->getListModel();
|
||||
}
|
||||
|
||||
|
||||
return $this->_model;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alias for getModel()->get and getListModel()->get().
|
||||
* May be used inside field-method in read/write mode.
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed|null - current value of the chosen db field.
|
||||
*/
|
||||
public function getFieldVar($key = null)
|
||||
{
|
||||
if(empty($key))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if($this->getQuery('action') == 'list')
|
||||
{
|
||||
return $this->getListModel()->get($key);
|
||||
}
|
||||
|
||||
return $this->getModel()->get($key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set controller model
|
||||
* @param e_admin_model $model
|
||||
|
Reference in New Issue
Block a user