Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -33,7 +33,7 @@ class _CleanUpGalleryImages
|
||||
{
|
||||
try
|
||||
{
|
||||
$data['count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_images' )->first();
|
||||
$data['count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_images', array( 'image_media=?', 0 ) )->first();
|
||||
}
|
||||
catch( \Exception $ex )
|
||||
{
|
||||
@@ -66,7 +66,7 @@ class _CleanUpGalleryImages
|
||||
}
|
||||
|
||||
$last = NULL;
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', NULL, 'image_id ASC', array( $offset, 100 ) ) as $image )
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', array( 'image_media=?', 0 ), 'image_id ASC', array( $offset, 100 ) ) as $image )
|
||||
{
|
||||
$data['did']++;
|
||||
|
||||
@@ -85,8 +85,19 @@ class _CleanUpGalleryImages
|
||||
|
||||
$update = array( 'image_data' => json_encode( $sizes ) );
|
||||
|
||||
/* If we have a medium but no large image, or a thumb but no small image, adapt as appropriate */
|
||||
/* If we have a medium but no large image, or a thumb but no small image, adapt as appropriate. Also if one image is mapped for
|
||||
multiple columns be sure we don't remove it if we still need it. */
|
||||
$keepMedium = FALSE;
|
||||
if( $image['image_medium_file_name'] == $image['image_masked_file_name'] )
|
||||
{
|
||||
$keepMedium = TRUE;
|
||||
}
|
||||
$keepThumb = FALSE;
|
||||
if( $image['image_thumb_file_name'] == $image['image_masked_file_name'] )
|
||||
{
|
||||
$keepThumb = TRUE;
|
||||
}
|
||||
|
||||
if( !$image['image_masked_file_name'] AND $image['image_medium_file_name'] )
|
||||
{
|
||||
$image['image_masked_file_name'] = $image['image_medium_file_name'];
|
||||
@@ -94,7 +105,6 @@ class _CleanUpGalleryImages
|
||||
$keepMedium = TRUE;
|
||||
}
|
||||
|
||||
$keepThumb = FALSE;
|
||||
if( !$image['image_small_file_name'] AND $image['image_thumb_file_name'] )
|
||||
{
|
||||
$image['image_small_file_name'] = $image['image_thumb_file_name'];
|
||||
|
||||
@@ -76,7 +76,6 @@ class _Follow
|
||||
|
||||
$directContainer = ( !is_null( $data['album_id'] ) ) ? \IPS\gallery\Album::load( $data['album_id'] ) : \IPS\gallery\Category::load( $data['category_id'] );
|
||||
|
||||
$title = $directContainer->_title;
|
||||
return array( 'text' => \IPS\Member::loggedIn()->language()->addToStack('backgroundQueue_follow', FALSE, array( 'htmlsprintf' => array( "<a href='{$directContainer->url()}' target='_blank'>{$title}</a>" ) ) ), 'complete' => $complete );
|
||||
return array( 'text' => \IPS\Member::loggedIn()->language()->addToStack('backgroundQueue_follow', FALSE, array( 'htmlsprintf' => array( \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->basicUrl( $directContainer->url(), TRUE, $directContainer->_title, FALSE ) ) ) ), 'complete' => $complete );
|
||||
}
|
||||
}
|
||||
@@ -89,8 +89,6 @@ class _RebuildGalleryImages
|
||||
|
||||
if( $last === NULL )
|
||||
{
|
||||
\IPS\Session::i()->log( 'acplogs__gallery_rebuilt' );
|
||||
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user