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

+26 -7
View File
@@ -728,7 +728,7 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
}
else if( !$new AND isset( $this->changed['approved'] ) )
{
\IPS\Api\Webhook::fire( 'club_created', $this );
$this->onApprove();
}
return NULL;
@@ -1364,17 +1364,25 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
{
continue;
}
$this->cachedNodes[ $row['id'] ] = array(
try
{
$this->cachedNodes[ $row['id'] ] = array(
'name' => $row['name'],
'url' => \IPS\Http\Url::internal( $class::$urlBase . $row['node_id'], 'front', $class::$urlTemplate, array( \IPS\Http\Url\Friendly::seoTitle( $row['name'] ) ) ),
'url' => $row['node_class']::load( $row['node_id'] )->url(),
'node_class' => $row['node_class'],
'node_id' => $row['node_id'],
'public' => $row['public']
);
);
}
catch( \OutOfRangeException $e )
{
\IPS\Log::log( 'Missing club node ' . $row['node_class'] . ' ' . $row['node_id'] . " is being loaded.", 'club_nodes');
}
}
}
return $this->cachedNodes;
}
@@ -2172,4 +2180,15 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
\IPS\Db::i()->update( 'core_clubs_memberships', array( 'rules_acknowledged' => TRUE ), array( "club_id=? AND member_id=?", $this->id, $member->member_id ) );
}
}
/**
* Called when a club requiring moderation gets approved
*
* @return void
*/
public function onApprove()
{
\IPS\Api\Webhook::fire( 'club_created', $this );
$this->owner->achievementAction( 'core', 'NewClub', $this );
}
}
+10
View File
@@ -157,6 +157,12 @@ class _Page extends \IPS\Patterns\ActiveRecord
'moderator' => 'club_page_moderators'
) ) ) );
}
/* Add the index setting if this page is shown to guests */
if ( $club->type !== \IPS\Member\Club::TYPE_PRIVATE AND \IPS\Member::loggedIn()->group['gbw_club_manage_indexing'] )
{
$form->add( new \IPS\Helpers\Form\YesNo('club_page_meta_index', ( $current ) ? $current->meta_index : TRUE, FALSE, [], NULL, NULL, NULL, 'club_page_meta_index' ) );
}
}
/**
@@ -178,6 +184,10 @@ class _Page extends \IPS\Patterns\ActiveRecord
{
$this->can_view = NULL;
}
if( array_key_exists( 'club_page_meta_index', $values ) )
{
$this->meta_index = $values['club_page_meta_index'];
}
}
/**
+1
View File
@@ -86,6 +86,7 @@ class _Group extends \IPS\Patterns\ActiveRecord
'gbw_hide_inline_modevents' => 128, // Users in this group can see inline moderation events (where supported)
'gbw_posted_in' => 256, // Items (topics, articles) will be marked as 'posted in by this group'
'gbw_posted_in_secondary' => 512, // Items (topics, articles) will be marked as 'posted in by this group' when the group is set as a secondary group
'gbw_club_manage_indexing' => 1024, // Users in this group can manage indexing of clubs
)
)
);
+9 -5
View File
@@ -119,6 +119,7 @@ class _Member extends \IPS\Patterns\ActiveRecord
'datalayer_event_fired' => 8388608,
'new_device_email' => 16777216, // Send an email when a new device is used to log in.
'no_solved_reenage' => 33554432, // User does not want to get topic re-engagement emails
'datalayer_pii_optout' => 67108864, // User has opted in to having their PII collected by datalayer
)
)
);
@@ -202,7 +203,7 @@ class _Member extends \IPS\Patterns\ActiveRecord
if ( !static::$loggedInMember->member_id and isset( \IPS\Request::i()->cookie['ipsTimezone'] ) )
{
static::$loggedInMember->timezone = \IPS\Request::i()->cookie['ipsTimezone'];
static::$loggedInMember->timezone = \IPS\DateTime::getFixedTimezone( \IPS\Request::i()->cookie['ipsTimezone'] );
}
}
@@ -3508,7 +3509,7 @@ class _Member extends \IPS\Patterns\ActiveRecord
}
$return['reputationPoints'] = $this->pp_reputation_points;
$return['photoUrl'] = static::photoUrl( $this->_data, FALSE );
$return['photoUrlIsDefault'] = $this->pp_photo_type == 'none' or static::photoUrl( $this->_data, FALSE, FALSE, FALSE ) != $return['photoUrl'];
$return['photoUrlIsDefault'] = \in_array( $this->pp_photo_type, [ 'none', 'letter' ] ) or static::photoUrl( $this->_data, FALSE, FALSE, FALSE ) != $return['photoUrl'];
$return['coverPhotoUrl'] = $this->pp_cover_photo ? ( (string) \IPS\File::get( 'core_Profile', $this->pp_cover_photo )->url ) : '';
$return['profileUrl'] = ( $this->member_id ) ? (string) $this->url() : NULL;
if ( !$authorizedMember )
@@ -3524,7 +3525,10 @@ class _Member extends \IPS\Patterns\ActiveRecord
$return['lastPost'] = $this->member_last_post ? \IPS\DateTime::ts( $this->member_last_post )->rfc3339() : NULL;
}
$return['birthday'] = $this->bday_month ? ( $this->bday_month . '/' . $this->bday_day . ( $this->bday_year ? '/' . $this->bday_year : '' ) ) : NULL;
if( !$authorizedMember OR $authorizedMember?->member_id === $this->member_id )
{
$return['birthday'] = $this->bday_month ? ( $this->bday_month . '/' . $this->bday_day . ( $this->bday_year ? '/' . $this->bday_year : '' ) ) : NULL;
}
$return['profileViews'] = $this->members_profile_views;
$return['customFields'] = $fields;
@@ -3822,7 +3826,7 @@ class _Member extends \IPS\Patterns\ActiveRecord
*/
public function recountReputation()
{
$this->pp_reputation_points = \IPS\Db::i()->select( 'SUM(rep_rating)', 'core_reputation_index', array( 'member_received=?', $this->member_id ) );
$this->pp_reputation_points = \IPS\Db::i()->select( 'SUM(rep_rating)', 'core_reputation_index', array( 'member_received=?', $this->member_id ) )->first();
$this->save();
}
@@ -5444,7 +5448,7 @@ class _Member extends \IPS\Patterns\ActiveRecord
/* Are they enabled for our group? */
$sigLimits = explode( ":", $this->group['g_signature_limits'] );
if( $sigLimits[0] )
if( $sigLimits[0] OR $sigLimits[5] == 0 )
{
return FALSE;
}