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 );
}
}