Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -63,10 +63,32 @@ class _RebuildGalleryImages
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
/* Intentionally no try/catch as it means app doesn't exist */
|
||||
try
|
||||
{
|
||||
$app = \IPS\convert\App::load( $data['app'] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
$last = NULL;
|
||||
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'gallery_images', array( "image_id>?", $offset ), 'image_id ASC', array( 0, 10 ) ), 'IPS\gallery\Image' ) AS $image )
|
||||
{
|
||||
/* Is this converted content? */
|
||||
try
|
||||
{
|
||||
/* Just checking, we don't actually need anything */
|
||||
$app->checkLink( $image->id, 'gallery_images' );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$last = $image->id;
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$image->buildThumbnails();
|
||||
|
||||
Reference in new issue
Block a user