Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -47,19 +47,6 @@ class _Images
$image = \IPS\Db::i()->select( '*', 'gallery_images', array(), 'image_id', array( $offset, 1 ) )->first();
$update = array();
if( $image['image_thumb_file_name'] )
{
try
{
$file = \IPS\File::get( $oldConfiguration ?: 'gallery_Images', $image['image_thumb_file_name'] )->move( $storageConfiguration );
$update['image_thumb_file_name'] = (string) $file;
}
catch( \Exception $e )
{
/* Any issues are logged */
}
}
if( $image['image_small_file_name'] )
{
try
@@ -93,26 +80,6 @@ class _Images
}
}
if( $image['image_medium_file_name'] )
{
if( $image['image_medium_file_name'] == $image['image_masked_file_name'] AND isset( $update['image_masked_file_name'] ) )
{
$update['image_medium_file_name'] = $update['image_masked_file_name'];
}
else
{
try
{
$file = \IPS\File::get( $oldConfiguration ?: 'gallery_Images', $image['image_medium_file_name'] )->move( $storageConfiguration );
$update['image_medium_file_name'] = (string) $file;
}
catch( \Exception $e )
{
/* Any issues are logged */
}
}
}
if( $image['image_original_file_name'] )
{
if( $image['image_original_file_name'] == $image['image_masked_file_name'] AND isset( $update['image_masked_file_name'] ) )
@@ -161,7 +128,7 @@ class _Images
$image = \IPS\Db::i()->select( '*', 'gallery_images', array(), 'image_id', array( $offset, 1 ) )->first();
$update = array();
foreach( array( 'image_thumb_file_name', 'image_small_file_name', 'image_masked_file_name', 'image_medium_file_name', 'image_original_file_name' ) as $key )
foreach( array( 'image_small_file_name', 'image_masked_file_name', 'image_original_file_name' ) as $key )
{
if( $image[ $key ] )
{
@@ -188,7 +155,7 @@ class _Images
{
try
{
$record = \IPS\Db::i()->select( '*', 'gallery_images', array( 'image_masked_file_name=? OR image_medium_file_name=? OR image_original_file_name=? OR image_thumb_file_name=? OR image_small_file_name=?', (string) $file, (string) $file, (string) $file, (string) $file, (string) $file ) )->first();
$record = \IPS\Db::i()->select( '*', 'gallery_images', array( 'image_masked_file_name=? OR image_original_file_name=? OR image_small_file_name=?', (string) $file, (string) $file, (string) $file ) )->first();
return TRUE;
}
@@ -207,49 +174,16 @@ class _Images
{
foreach( \IPS\Db::i()->select( '*', 'gallery_images' ) as $image )
{
if( $image['image_masked_file_name'] )
foreach( array( 'image_masked_file_name', 'image_original_file_name', 'image_small_file_name' ) as $size )
{
try
if( $image[ $size ] )
{
\IPS\File::get( 'gallery_Images', $image['image_masked_file_name'] )->delete();
try
{
\IPS\File::get( 'gallery_Images', $image[ $size ] )->delete();
}
catch( \Exception $e ){}
}
catch( \Exception $e ){}
}
if( $image['image_original_file_name'] )
{
try
{
\IPS\File::get( 'gallery_Images', $image['image_original_file_name'] )->delete();
}
catch( \Exception $e ){}
}
if( $image['image_medium_file_name'] )
{
try
{
\IPS\File::get( 'gallery_Images', $image['image_medium_file_name'] )->delete();
}
catch( \Exception $e ){}
}
if( $image['image_thumb_file_name'] )
{
try
{
\IPS\File::get( 'gallery_Images', $image['image_thumb_file_name'] )->delete();
}
catch( \Exception $e ){}
}
if( $image['image_small_file_name'] )
{
try
{
\IPS\File::get( 'gallery_Images', $image['image_small_file_name'] )->delete();
}
catch( \Exception $e ){}
}
}
}