Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\gallery\extensions\core\Queue;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -66,7 +66,7 @@ class _CleanUpGalleryImages
|
||||
}
|
||||
|
||||
$last = NULL;
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', array( 'image_media=?', 0 ), 'image_id ASC', array( $offset, 100 ) ) as $image )
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', array( 'image_media=? AND image_id > ?', 0, (int) $offset ), 'image_id ASC', \IPS\REBUILD_SLOW ) as $image )
|
||||
{
|
||||
$data['did']++;
|
||||
|
||||
@@ -159,10 +159,11 @@ class _CleanUpGalleryImages
|
||||
/**
|
||||
* Perform post-completion processing
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data Data returned from preQueueData
|
||||
* @param bool $processed Was anything processed or not? If preQueueData returns NULL, this will be FALSE.
|
||||
* @return void
|
||||
*/
|
||||
public function postComplete( $data )
|
||||
public function postComplete( $data, $processed = TRUE )
|
||||
{
|
||||
\IPS\Db::i()->query( "ALTER TABLE `" . \IPS\Db::i()->prefix . "gallery_images` DROP COLUMN image_thumb_file_name, DROP COLUMN image_medium_file_name" );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user