Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -99,8 +99,29 @@ class _Table extends \IPS\Helpers\Table\Table
|
||||
$where[] = array( 'blog_social_group IS NULL' );
|
||||
}
|
||||
|
||||
/* Exclude club blogs */
|
||||
$where[] = array( 'blog_club_id IS NULL' );
|
||||
/* Exclude club blogs unless we have permission to view them */
|
||||
if ( \IPS\Settings::i()->club_nodes_in_apps )
|
||||
{
|
||||
if ( \IPS\Member::loggedIn()->member_id )
|
||||
{
|
||||
$where[] = array(
|
||||
'( blog_club_id IS NULL OR blog_club_id IN(?) OR blog_club_id IN(?) )',
|
||||
\IPS\Db::i()->select( 'id', 'core_clubs', array( \IPS\Db::i()->in( 'type', array( \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_OPEN, \IPS\Member\Club::TYPE_READONLY ) ) ) ),
|
||||
\IPS\Db::i()->select( 'club_id', 'core_clubs_memberships', array( "member_id=? AND status IN('" . \IPS\Member\Club::STATUS_MEMBER . "','" . \IPS\Member\Club::STATUS_MODERATOR . "','" . \IPS\Member\Club::STATUS_LEADER . "')", \IPS\Member::loggedIn()->member_id ) ),
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array(
|
||||
'( blog_club_id IS NULL OR blog_club_id IN(?) )',
|
||||
\IPS\Db::i()->select( 'id', 'core_clubs', array( \IPS\Db::i()->in( 'type', array( \IPS\Member\Club::TYPE_PUBLIC, \IPS\Member\Club::TYPE_OPEN, \IPS\Member\Club::TYPE_READONLY ) ) ) ),
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array( 'blog_club_id IS NULL' );
|
||||
}
|
||||
|
||||
/* Get Count */
|
||||
$count = \IPS\Db::i()->select( 'COUNT(*) as cnt', 'blog_blogs', $where )->first();
|
||||
|
||||
Reference in new issue
Block a user