Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -199,4 +199,25 @@ class _NodeController extends \IPS\Api\Controller
|
||||
/* Output */
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the global available where condition for all nodes
|
||||
*
|
||||
* @param array|null $where Extra WHERE clause
|
||||
* @return array
|
||||
*/
|
||||
protected function _globalWhere(array $where = NULL): array
|
||||
{
|
||||
$class = $this->class;
|
||||
|
||||
$where = $where ?: [];
|
||||
$idField = $class::$databaseTable . '.' . $class::$databasePrefix . '.' . $class::$databaseColumnId;
|
||||
|
||||
if ( isset( \IPS\Request::i()->ids ) )
|
||||
{
|
||||
$where[] = array( \IPS\Db::i()->in( $idField, array_map( 'intval', explode(',', \IPS\Request::i()->ids ) ) ) );
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user