Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+22 -9
View File
@@ -130,12 +130,15 @@ trait ClubContainer
{
$this->setPermissionsToClub( $club );
}
$followApp = $itemClass::$application;
$followArea = mb_strtolower( mb_substr( $nodeClass, mb_strrpos( $nodeClass, '\\' ) + 1 ) );
$time = time();
\IPS\Db::i()->insert( 'core_follow', \IPS\Db::i()->select( "MD5( CONCAT( '{$followApp};{$followArea};{$this->_id};', follow_member_id ) ) AS follow_id, '{$followApp}' AS follow_app, '{$followArea}' AS follow_area, '{$this->_id}' AS follow_rel_id, follow_member_id, follow_is_anon, '{$time}' AS follow_added, follow_notify_do, follow_notify_meta, follow_notify_freq, 0 AS follow_notify_sent, follow_visible", 'core_follow', array(
'follow_app=? AND follow_area=? AND follow_rel_id=?', 'core', 'club', $club->id ) ) );
if ( !$haveId )
{
$followApp = $itemClass::$application;
$followArea = mb_strtolower( mb_substr( $nodeClass, mb_strrpos( $nodeClass, '\\' ) + 1 ) );
$time = time();
\IPS\Db::i()->insert( 'core_follow', \IPS\Db::i()->select( "MD5( CONCAT( '{$followApp};{$followArea};{$this->_id};', follow_member_id ) ) AS follow_id, '{$followApp}' AS follow_app, '{$followArea}' AS follow_area, '{$this->_id}' AS follow_rel_id, follow_member_id, follow_is_anon, '{$time}' AS follow_added, follow_notify_do, follow_notify_meta, follow_notify_freq, 0 AS follow_notify_sent, follow_visible", 'core_follow', array(
'follow_app=? AND follow_area=? AND follow_rel_id=?', 'core', 'club', $club->id ) ) );
}
}
/**
@@ -299,12 +302,22 @@ trait ClubContainer
{
if ( \IPS\Settings::i()->clubs )
{
$clubIdColumn = $this->clubIdColumn();
$clubIdColumn = $this->clubIdColumn();
$itemClass = $itemClass ?: static::$contentItemClass;
$title = $itemClass::$title;
if ( $this->$clubIdColumn and $club = $this->club() )
{
if ( in_array( $club->memberStatus( $member ), array( \IPS\Member\Club::STATUS_LEADER, \IPS\Member\Club::STATUS_MODERATOR ) ) )
if ( \in_array( $club->memberStatus( $member ), array( \IPS\Member\Club::STATUS_LEADER, \IPS\Member\Club::STATUS_MODERATOR ) ) )
{
if ( in_array( $type, explode( ',', \IPS\Settings::i()->clubs_modperms ) ) )
if ( \in_array( $type, explode( ',', \IPS\Settings::i()->clubs_modperms ) ) )
{
return TRUE;
}
}
elseif ( $member->modPermission( "can_{$type}_{$title}" ) and \is_array( $member->modPermission( static::$modPerm ) ) and $member->modPermission('can_access_all_clubs') )
{
if ( \in_array( $type, explode( ',', \IPS\Settings::i()->clubs_modperms ) ) )
{
return TRUE;
}