Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

+22 -9
View File
@@ -701,6 +701,12 @@ class _Item extends \IPS\Content\Item implements
return $lastMod;
}
/**
* Store club node IDs so we can save on queries
* @var array|null
*/
protected static ?array $_clubNodeIds = null;
/**
* Return query WHERE clause to use for getItemsWithPermission when excluding club content
*
@@ -708,16 +714,23 @@ class _Item extends \IPS\Content\Item implements
*/
public static function clubAlbumExclusion(): array
{
if( \IPS\Settings::i()->club_nodes_in_apps )
if( !\IPS\Settings::i()->club_nodes_in_apps )
{
return array();
}
else
{
return array( array(
'gallery_albums.album_category_id NOT IN(?)',
\IPS\Db::i()->select( 'node_id', 'core_clubs_node_map', array( 'node_class=?', 'IPS\gallery\Category' ) )
) );
if( static::$_clubNodeIds === null )
{
static::$_clubNodeIds = iterator_to_array(
\IPS\Db::i()->select( 'node_id', 'core_clubs_node_map', array( 'node_class=?', 'IPS\gallery\Category' ) )
);
}
if( \count( static::$_clubNodeIds ) )
{
return array(
array( \IPS\Db::i()->in( 'gallery_albums.album_category_id', static::$_clubNodeIds, true ) )
);
}
}
return array();
}
}