1
0
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:
Cameron
2016-07-07 08:49:22 -07:00
parent 99a3c0fac2
commit 7223abe458
2 changed files with 25 additions and 68 deletions

View File

@@ -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