Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+4 -23
View File
@@ -15,6 +15,7 @@ namespace IPS\core\tasks;
use Exception;
use IPS\Db;
use IPS\Member;
use IPS\Member\Club;
use IPS\Patterns\ActiveRecordIterator;
use IPS\Settings;
use IPS\Task;
@@ -58,31 +59,11 @@ class clubrebuild extends Task
{
return FALSE;
}
foreach ( new ActiveRecordIterator( $select, 'IPS\Member\Club' ) as $club )
{
$club->content = 0;
$club->last_activity = 0;
foreach ( $club->nodes() as $node )
{
try
{
$nodeClass = $node['node_class'];
$node = $nodeClass::load( $node['node_id'] );
if ( $lastCommentTime = $node->getLastCommentTime( new Member ) and $lastCommentTime->getTimestamp() > $club->last_activity )
{
$club->last_activity = $lastCommentTime->getTimestamp();
}
$club->content += (int) $node->getContentItemCount();
}
catch ( Exception $e ) { }
}
$club->rebuilt = time();
$club->save();
/* @var Club $club */
$club->updateLastActivityAndItemCount( new Member );
}
return TRUE;
+2 -1
View File
@@ -15,6 +15,7 @@ namespace IPS\core\tasks;
use IPS\Db;
use IPS\File;
use IPS\File\Amazon;
use IPS\File\Backblaze;
use IPS\Task;
use IPS\Task\Exception;
use UnderflowException;
@@ -51,7 +52,7 @@ class s3Delete extends Task
$obj = File::getClass('core_Theme');
if ( !( $obj instanceof Amazon ) )
if ( !( $obj instanceof Amazon ) OR ( $obj instanceof Backblaze ) )
{
/* Class is not Amazon, so just stop here and truncate the table as there's nothing we can really do now. */
Db::i()->delete( 'core_s3_deletions' );
-4
View File
@@ -26,10 +26,6 @@ use function defined;
use function in_array;
use function intval;
use function is_array;
use const IPS\CACHE_CONFIG;
use const IPS\CACHE_METHOD;
use const IPS\REDIS_CONFIG;
use const IPS\REDIS_ENABLED;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{