mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Avoid possible error using batch with custom method. Extra flexibility to allow modifying of listQry with custom filter handler.
This commit is contained in:
@@ -2426,6 +2426,7 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
* @var array UI field data
|
* @var array UI field data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
protected $listQry;
|
||||||
|
|
||||||
protected $pid;
|
protected $pid;
|
||||||
|
|
||||||
@@ -2976,7 +2977,13 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
|
|
||||||
if($this->getAction() === 'list' || $this->getAction() === 'grid')
|
if($this->getAction() === 'list' || $this->getAction() === 'grid')
|
||||||
{
|
{
|
||||||
return $this->getListModel()->get($key);
|
$obj = $this->getListModel();
|
||||||
|
if(is_object($obj))
|
||||||
|
{
|
||||||
|
return $obj->get($key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getModel()->get($key);
|
return $this->getModel()->get($key);
|
||||||
@@ -4078,10 +4085,13 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
$tableSJoinArr = array(); // FROM for join tables
|
$tableSJoinArr = array(); // FROM for join tables
|
||||||
$filter = array();
|
$filter = array();
|
||||||
|
|
||||||
|
$this->listQry = $listQry;
|
||||||
|
|
||||||
$searchQuery = $this->fixSearchWildcards($tp->toDB($request->getQuery('searchquery', '')));
|
$searchQuery = $this->fixSearchWildcards($tp->toDB($request->getQuery('searchquery', '')));
|
||||||
$searchFilter = $this->_parseFilterRequest($request->getQuery('filter_options', ''));
|
$searchFilter = $this->_parseFilterRequest($request->getQuery('filter_options', ''));
|
||||||
|
|
||||||
|
$listQry = $this->listQry; // check for modification during parseFilterRequest();
|
||||||
|
|
||||||
if(E107_DEBUG_LEVEL == E107_DBG_SQLQUERIES)
|
if(E107_DEBUG_LEVEL == E107_DBG_SQLQUERIES)
|
||||||
{
|
{
|
||||||
e107::getMessage()->addDebug('searchQuery: <b>'.$searchQuery.'</b>');
|
e107::getMessage()->addDebug('searchQuery: <b>'.$searchQuery.'</b>');
|
||||||
|
Reference in New Issue
Block a user