Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

+21
View File
@@ -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;
}
}
+11 -3
View File
@@ -3783,10 +3783,18 @@ abstract class _Model extends \IPS\Patterns\ActiveRecord
{
$return['permissions'] = \in_array( 'IPS\Node\Permissions', class_implements( \get_class( $this ) ) ) ? $this->permissions() : NULL;
}
if ( \IPS\IPS::classUsesTrait( \get_called_class(), 'IPS\Content\ClubContainer' ) AND $this->club() )
if ( \IPS\IPS::classUsesTrait( \get_called_class(), 'IPS\Content\ClubContainer' ) )
{
$return['public'] = ( $this->isPublic() ) ? 1 : 0;
if( $this->club() )
{
$return['public'] = ( $this->isPublic() ) ? 1 : 0;
$return['club'] = $this->club()->apiOutput( $authorizedMember );
}
else
{
$return['club'] = 0;
}
}
return $return;