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\setup\upg_50000;
|
||||
|
||||
/* 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;
|
||||
@@ -667,7 +667,7 @@ class _Upgrade
|
||||
// Move any albums in a category with type 2 to members album cat
|
||||
//-----------------------------------------
|
||||
|
||||
if( count( $imagesOnly ) )
|
||||
if( \count( $imagesOnly ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'gallery_albums_main', array( 'album_category_id' => $foundMembersGallery ), 'album_category_id IN(' . implode( ',', $imagesOnly ) . ')' );
|
||||
}
|
||||
@@ -746,7 +746,7 @@ class _Upgrade
|
||||
{
|
||||
$perCycle = 100;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
$limit = \intval( \IPS\Request::i()->extra );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fetch albums that have a parent defined
|
||||
@@ -792,7 +792,7 @@ class _Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
$parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . intval($row['album_parent_id']) )->first();
|
||||
$parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . \intval($row['album_parent_id']) )->first();
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
@@ -809,7 +809,7 @@ class _Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
$_parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . intval($parent['album_parent_id']) )->first();
|
||||
$_parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . \intval($parent['album_parent_id']) )->first();
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
@@ -826,7 +826,7 @@ class _Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
$__parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . intval($_parent['album_parent_id']) )->first();
|
||||
$__parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . \intval($_parent['album_parent_id']) )->first();
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
@@ -843,7 +843,7 @@ class _Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
$___parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . intval($__parent['album_parent_id']) )->first();
|
||||
$___parent = \IPS\Db::i()->select( 'album_id, album_parent_id, album_category_id', 'gallery_albums_main', 'album_id=' . \intval($__parent['album_parent_id']) )->first();
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
@@ -875,7 +875,7 @@ class _Upgrade
|
||||
// Save updates
|
||||
//-----------------------------------------
|
||||
|
||||
if( count($update) )
|
||||
if( \count($update) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'gallery_albums_main', $update, 'album_id=' . $row['album_id'] );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user