Version 5.0.0 beta 4

This commit is contained in:
Neo committed 2025-12-19 16:57:00 -08:00
1 parent e86153356a
commit 2f24f9de48
276 files changed
+8614 -6044

No files matched your search

@@ -19,6 +19,7 @@ use InvalidArgumentException;
use IPS\Application;
use IPS\convert\App;
use IPS\Db;
use IPS\Extensions\QueueAbstract;
use IPS\Member;
use IPS\Patterns\ActiveRecordIterator;
use IPS\Task\Queue\OutOfRangeException;
@@ -34,7 +35,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
/**
* Background Task
*/
class RebuildGalleryImages
class RebuildGalleryImages extends QueueAbstract
{
/**
* Parse data before queuing
@@ -68,7 +69,7 @@ class RebuildGalleryImages
*
* @param mixed $data Data as it was passed to \IPS\Task::queue()
* @param int $offset Offset
* @return int|null New offset or NULL if complete
* @return int New offset or NULL if complete
* @throws OutOfRangeException Indicates offset doesn't exist and thus task is complete
*/
public function run( mixed &$data, int $offset ): int
@@ -111,12 +112,7 @@ class RebuildGalleryImages
$image->buildThumbnails();
$image->save();
}
catch( DomainException $e )
{
$image->delete();
}
/* File fails the image type test */
catch( InvalidArgumentException $e )
catch( DomainException | InvalidArgumentException $e )
{
$image->delete();
}