Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
Whitespace-only changes.
@@ -1,71 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 30 Oct 2014
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100002;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix SEO titles
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Older installs may not allow NULL */
|
||||
$albums = \IPS\Db::i()->getTableDefinition( 'gallery_albums', TRUE );
|
||||
|
||||
if( !$albums['columns']['album_name_seo']['allow_null'] )
|
||||
{
|
||||
\IPS\Db::i()->dropIndex( 'gallery_albums', 'album_parent_id' );
|
||||
\IPS\Db::i()->changeColumn( 'gallery_albums', 'album_name_seo', array( 'name' => 'album_name_seo', 'type' => 'VARCHAR', 'length' => 255, 'allow_null' => TRUE, 'default' => null ) );
|
||||
\IPS\Db::i()->addIndex( 'gallery_albums', array(
|
||||
'type' => 'key',
|
||||
'name' => 'album_parent_id',
|
||||
'columns' => array( 'album_category_id', 'album_name_seo' ),
|
||||
'length' => array( null, 181 )
|
||||
) );
|
||||
}
|
||||
|
||||
$images = \IPS\Db::i()->getTableDefinition( 'gallery_images', TRUE );
|
||||
|
||||
if( !$images['columns']['image_caption_seo']['allow_null'] )
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'gallery_images', 'image_caption_seo', array( 'name' => 'image_caption_seo', 'type' => 'VARCHAR', 'length' => 255, 'allow_null' => TRUE, 'default' => null ) );
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'gallery_albums', array( 'album_name_seo' => null ) );
|
||||
\IPS\Db::i()->update( 'gallery_categories', array( 'category_name_seo' => null ) );
|
||||
\IPS\Db::i()->update( 'gallery_images', array( 'image_caption_seo' => null ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Resetting gallery friendly URL titles";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"gallery_comments",
|
||||
"comment_text"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_caption"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "dropIndex",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_description"
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,213 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 18 Feb 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100015;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix gallery album serialization
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Some init */
|
||||
$did = 0;
|
||||
$perCycle = 1000;
|
||||
$limit = 0;
|
||||
|
||||
if( isset( \IPS\Request::i()->extra ) )
|
||||
{
|
||||
$limit = (int) \IPS\Request::i()->extra;
|
||||
}
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_albums', NULL, 'album_id ASC', array( $limit, $perCycle ) ) as $album )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
$update = array();
|
||||
|
||||
if( @unserialize( $album['album_last_x_images'] ) !== FALSE )
|
||||
{
|
||||
$update['album_last_x_images'] = json_encode( unserialize( $album['album_last_x_images'] ) );
|
||||
}
|
||||
|
||||
if( @unserialize( $album['album_sort_options'] ) !== FALSE )
|
||||
{
|
||||
$_sort = unserialize( $album['album_sort_options'] );
|
||||
|
||||
$_new = 'updated';
|
||||
|
||||
switch( $_sort['key'] )
|
||||
{
|
||||
case 'image_rating':
|
||||
$_new = 'rating';
|
||||
break;
|
||||
|
||||
case 'image_comments':
|
||||
$_new = 'num_comments';
|
||||
break;
|
||||
}
|
||||
|
||||
$update['album_sort_options'] = $_new;
|
||||
}
|
||||
|
||||
if( \count( $update ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'gallery_albums', $update, 'album_id=' . $album['album_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* And then continue */
|
||||
if( $did AND $did == $perCycle )
|
||||
{
|
||||
return $limit + $did;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step1Count'] ) )
|
||||
{
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_albums' )->first();
|
||||
}
|
||||
|
||||
return "Updating gallery album images (Updated so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix references to small images that don't exist
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
/* Don't do this if we are coming from an older version as we've already done it */
|
||||
if( isset( $_SESSION['40_gallery_images_done'] ) )
|
||||
{
|
||||
unset( $_SESSION['40_gallery_images_done'] );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Some init */
|
||||
$did = 0;
|
||||
$perCycle = 200;
|
||||
$limit = 0;
|
||||
|
||||
if( isset( \IPS\Request::i()->extra ) )
|
||||
{
|
||||
$limit = (int) \IPS\Request::i()->extra;
|
||||
}
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
/* Loop over images */
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', NULL, 'image_id ASC', array( $limit, $perCycle ) ) as $row )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
$file = \IPS\File::get( 'gallery_Images', $row['image_small_file_name'] );
|
||||
|
||||
/* If the size is 0 (or NULL more likely) it does not exist */
|
||||
if( !$file->filesize() )
|
||||
{
|
||||
$update = array( 'image_small_file_name' => $row['image_medium_file_name'] );
|
||||
|
||||
$data = json_decode( $row['image_data'], TRUE );
|
||||
$data['small'] = $data['medium'];
|
||||
|
||||
$update['image_data'] = json_encode( $data );
|
||||
|
||||
\IPS\Db::i()->update( 'gallery_images', $update, array( 'image_id=?', $row['image_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* And then continue */
|
||||
if( $did AND $did == $perCycle )
|
||||
{
|
||||
return $limit + $did;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step2Count'] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step2Count'] ) )
|
||||
{
|
||||
$_SESSION['_step2Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_images' )->first();
|
||||
}
|
||||
|
||||
return "Checking gallery images (Upgraded so far: " . ( ( $limit > $_SESSION['_step2Count'] ) ? $_SESSION['_step2Count'] : $limit ) . ' out of ' . $_SESSION['_step2Count'] . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish - This is run after all apps have been upgraded
|
||||
*
|
||||
* @return mixed If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
* @note We opted not to let users run this immediately during the upgrade because of potential issues (it taking a long time and users stopping it or getting frustrated) but we can revisit later
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildItems', array( 'class' => 'IPS\gallery\Image' ), 3, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\gallery\Image', 'count' => 0 ), 4, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\gallery\Category', 'count' => 0 ), 5, array( 'class' ) );
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 RC 5 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 5 May 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100018;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 RC 5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
|
||||
/**
|
||||
* Make sure all theme settings are applied to every theme.
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\gallery\Image' ), 4 );
|
||||
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\gallery\Image\Comment' ), 4 );
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\gallery\Category', 'count' => 0 ), 5, array( 'class' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"gallery_comments",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "comment_approved",
|
||||
"columns": [
|
||||
"comment_approved"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_metadata",
|
||||
{
|
||||
"name": "image_metadata",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": 0,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.2 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 14 Apr 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100025;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.2 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix album counts
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\gallery\Album', 'count' => 0 ), 5, array( 'class' ) );
|
||||
}
|
||||
catch( \OutOfRangeException $ex ) { }
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Rebuilding gallery album counts";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_hidden_comments",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_unapproved_comments",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.5 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 5 May 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100028;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
|
||||
/**
|
||||
* Make sure all theme settings are applied to every theme.
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::repairFileUrls('gallery');
|
||||
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\gallery\Image' ), 3, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\gallery\Image\Comment' ), 3, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildNonContentImages', array( 'extension' => 'gallery_Categories' ), 3, array( 'extension' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,90 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 18 Feb 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100030;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix gallery images category_id
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Some init */
|
||||
$did = 0;
|
||||
$perCycle = 250;
|
||||
$limit = 0;
|
||||
|
||||
if( isset( \IPS\Request::i()->extra ) )
|
||||
{
|
||||
$limit = (int) \IPS\Request::i()->extra;
|
||||
}
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_albums', NULL, 'album_id ASC', array( $limit, $perCycle ) ) as $album )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
if ( $album['album_category_id'] )
|
||||
{
|
||||
\IPS\Db::i()->update( 'gallery_images', array( 'image_category_id' => $album['album_category_id'] ), array( 'image_album_id=?', $album['album_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* And then continue */
|
||||
if( $did AND $did == $perCycle )
|
||||
{
|
||||
return $limit + $did;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step1Count'] ) )
|
||||
{
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_albums' )->first();
|
||||
}
|
||||
|
||||
return "Updating gallery album images (Updated so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_notifications",
|
||||
"extra=CONCAT('[', extra, ']')",
|
||||
"notification_key='new_content_bulk' AND item_class='IPS\\gallery\\Album'"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.9 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 19 Jun 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100035;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.9 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Update widgets
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
$areas = array( 'core_widget_areas' );
|
||||
if ( \IPS\Application::appIsEnabled('cms') )
|
||||
{
|
||||
$areas[] = 'cms_page_widget_areas';
|
||||
}
|
||||
|
||||
foreach ( $areas as $table )
|
||||
{
|
||||
foreach ( \IPS\Db::i()->select( '*', $table ) as $area )
|
||||
{
|
||||
$widgetsColumn = $table == 'core_widget_areas' ? 'widgets' : 'area_widgets';
|
||||
$whereClause = $table == 'core_widget_areas' ? array( 'id=? AND area=?', $area['id'], $area['area'] ) : array( 'area_page_id=? AND area_area=?', $area['area_page_id'], $area['area_area'] );
|
||||
|
||||
$widgets = json_decode( $area[ $widgetsColumn ], TRUE );
|
||||
$update = FALSE;
|
||||
|
||||
foreach ( $widgets as $k => $widget )
|
||||
{
|
||||
if ( $widget['key'] == 'recentImages' )
|
||||
{
|
||||
$widgets[ $k ]['key'] = 'imageFeed';
|
||||
if ( isset( $widgets[ $k ]['configuration']['number_to_show'] ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_show'] = $widgets[ $k ]['configuration']['number_to_show'];
|
||||
unset( $widgets[ $k ]['configuration']['number_to_show'] );
|
||||
}
|
||||
|
||||
$update = TRUE;
|
||||
}
|
||||
|
||||
if ( $widget['key'] == 'topImages' )
|
||||
{
|
||||
$widgets[ $k ]['key'] = 'imageFeed';
|
||||
|
||||
$widgets[ $k ]['configuration']['widget_feed_min_rating'] = 1;
|
||||
$widgets[ $k ]['configuration']['widget_feed_sort_on'] = 'rating';
|
||||
$widgets[ $k ]['configuration']['widget_feed_sort_dir'] = 'desc';
|
||||
|
||||
if ( isset( $widgets[ $k ]['configuration']['number_to_show'] ) )
|
||||
{
|
||||
$widgets[ $k ]['configuration']['widget_feed_show'] = $widgets[ $k ]['configuration']['number_to_show'];
|
||||
unset( $widgets[ $k ]['configuration']['number_to_show'] );
|
||||
}
|
||||
|
||||
$update = TRUE;
|
||||
}
|
||||
|
||||
if ( $update )
|
||||
{
|
||||
\IPS\Db::i()->update( $table, array( $widgetsColumn => json_encode( $widgets ) ), $whereClause );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_widgets",
|
||||
[
|
||||
"app=? AND `key`=?",
|
||||
"gallery",
|
||||
"recentImages"
|
||||
]
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_widgets",
|
||||
[
|
||||
"app=? AND `key`=?",
|
||||
"gallery",
|
||||
"topImages"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,154 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.12 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 27 Jul 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100042;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.12 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* We need to fix image data if any is bad - this is a relatively fast process typically
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Some init */
|
||||
$did = 0;
|
||||
$perCycle = 1000;
|
||||
$limit = 0;
|
||||
|
||||
if( isset( \IPS\Request::i()->extra ) )
|
||||
{
|
||||
$limit = (int) \IPS\Request::i()->extra;
|
||||
}
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
/* Loop over images */
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_images', NULL, 'image_id ASC', array( $limit, $perCycle ) ) as $row )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
$imageData = json_decode( $row['image_data'], TRUE );
|
||||
$rebuild = false;
|
||||
|
||||
if ( \is_array( $imageData ) )
|
||||
{
|
||||
foreach( $imageData as $size => $dimensions )
|
||||
{
|
||||
if( $dimensions[0] == 0 )
|
||||
{
|
||||
$rebuild = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$rebuild = true;
|
||||
}
|
||||
|
||||
if( $rebuild === true )
|
||||
{
|
||||
/* We use try/catch because getimagesize() will throw an \ErrorException if the file no longer exists */
|
||||
try
|
||||
{
|
||||
$large = ( isset( $row['image_masked_file_name'] ) ) ? \IPS\File::get( 'gallery_Images', $row['image_masked_file_name'] )->getImageDimensions() : array( 0, 0 );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$large = array( 0, 0 );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$medium = ( isset( $row['image_medium_file_name'] ) ) ? \IPS\File::get( 'gallery_Images', $row['image_medium_file_name'] )->getImageDimensions() : array( 0, 0 );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$medium = array( 0, 0 );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$small = ( isset( $row['image_small_file_name'] ) ) ? \IPS\File::get( 'gallery_Images', $row['image_small_file_name'] )->getImageDimensions() : array( 0, 0 );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$small = array( 0, 0 );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$thumb = ( isset( $row['image_thumb_file_name'] ) ) ? \IPS\File::get( 'gallery_Images', $row['image_thumb_file_name'] )->getImageDimensions() : array( 0, 0 );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
$thumb = array( 0, 0 );
|
||||
}
|
||||
|
||||
$newData = array(
|
||||
'large' => $large,
|
||||
'medium' => $medium,
|
||||
'small' => $small,
|
||||
'thumb' => $thumb,
|
||||
);
|
||||
|
||||
\IPS\Db::i()->update( 'gallery_images', array( 'image_data' => json_encode( $newData ) ), array( 'image_id=?', $row['image_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* And then continue */
|
||||
if( $did AND $did == $perCycle )
|
||||
{
|
||||
return $limit + $did;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step1Count'] ) )
|
||||
{
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'gallery_images' )->first();
|
||||
}
|
||||
|
||||
return "Fixing stored image dimensions (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,446 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "gallery_reviews",
|
||||
"columns": {
|
||||
"review_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 20,
|
||||
"name": "review_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_author": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_author",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_author_name": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 255,
|
||||
"name": "review_author_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_content": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "review_content",
|
||||
"type": "MEDIUMTEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_date": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_date",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_ip_address": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 46,
|
||||
"name": "review_ip_address",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_time": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_edit_time",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_member_name": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 255,
|
||||
"name": "review_edit_member_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_show": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "review_edit_show",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_rating": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_rating",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_total": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_votes_total",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_helpful": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_votes_helpful",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_data": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "review_votes_data",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_approved": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "review_approved",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_image_id": {
|
||||
"name": "review_image_id",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_id"
|
||||
]
|
||||
},
|
||||
"review_approved": {
|
||||
"type": "key",
|
||||
"name": "review_approved",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_approved"
|
||||
]
|
||||
},
|
||||
"review_ip": {
|
||||
"type": "key",
|
||||
"name": "review_ip",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_ip_address"
|
||||
]
|
||||
},
|
||||
"review_author": {
|
||||
"type": "key",
|
||||
"name": "review_author",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_author"
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8mb4_unicode_ci"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"name": "category_allow_reviews",
|
||||
"type": "TINYINT",
|
||||
"length": 4,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"name": "category_review_moderate",
|
||||
"type": "TINYINT",
|
||||
"length": 4,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_allow_reviews",
|
||||
"type": "TINYINT",
|
||||
"length": 4,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_count_reviews",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_count_reviews_hidden",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_reviews",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_reviews_queued",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_hidden_reviews",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_reviews_queued",
|
||||
{
|
||||
"name": "image_unapproved_reviews",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.0 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 25 Sep 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_101000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix images in the root uploads directory as they'll get stripped by the orphaned attachments tool
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$toRunQueries = array(
|
||||
array(
|
||||
'table' => 'gallery_images',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "gallery_images SET image_masked_file_name=SUBSTR( image_masked_file_name, 2 ) WHERE image_masked_file_name LIKE '/%'",
|
||||
),
|
||||
array(
|
||||
'table' => 'gallery_images',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "gallery_images SET image_medium_file_name=SUBSTR( image_medium_file_name, 2 ) WHERE image_medium_file_name LIKE '/%'",
|
||||
),
|
||||
array(
|
||||
'table' => 'gallery_images',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "gallery_images SET image_original_file_name=SUBSTR( image_original_file_name, 2 ) WHERE image_original_file_name LIKE '/%'",
|
||||
),
|
||||
array(
|
||||
'table' => 'gallery_images',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "gallery_images SET image_thumb_file_name=SUBSTR( image_thumb_file_name, 2 ) WHERE image_thumb_file_name LIKE '/%'",
|
||||
),
|
||||
array(
|
||||
'table' => 'gallery_images',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "gallery_images SET image_small_file_name=SUBSTR( image_small_file_name, 2 ) WHERE image_small_file_name LIKE '/%'",
|
||||
),
|
||||
);
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( \count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing broken gallery image paths";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"image_metadata": null
|
||||
},
|
||||
[
|
||||
"image_metadata=?",
|
||||
"false"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.0 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 3 Feb 2015
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_101006;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.0 RC 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Finish step
|
||||
* Rebuild last poster data
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\\gallery\\Category', 'count' => 0 ), 5, array( 'class' ) );
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\\gallery\\Album', 'count' => 0 ), 5, array( 'class' ) );
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_images_uploads",
|
||||
"upload_session",
|
||||
{
|
||||
"name": "upload_session",
|
||||
"type": "VARCHAR",
|
||||
"length": 128,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images_uploads",
|
||||
{
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 20,
|
||||
"name": "upload_unique_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
"values": [],
|
||||
"zerofill": false,
|
||||
"primary": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
"album_rating_aggregate",
|
||||
{
|
||||
"name": "album_rating_aggregate",
|
||||
"type": "DECIMAL",
|
||||
"length": 11,
|
||||
"decimals": 1,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_rating",
|
||||
{
|
||||
"name": "image_rating",
|
||||
"type": "DECIMAL",
|
||||
"length": 10,
|
||||
"decimals": 1,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,132 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.17 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 24 Oct 2016
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_101071;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.17 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Remove old columns if they exist
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_key' ) )
|
||||
{
|
||||
$columns[] = 'upload_key';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_album_id' ) )
|
||||
{
|
||||
$columns[] = 'upload_album_id';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_category_id' ) )
|
||||
{
|
||||
$columns[] = 'upload_category_id';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_file_directory' ) )
|
||||
{
|
||||
$columns[] = 'upload_file_directory';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_file_name_original' ) )
|
||||
{
|
||||
$columns[] = 'upload_file_name_original';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_file_size' ) )
|
||||
{
|
||||
$columns[] = 'upload_file_size';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_file_type' ) )
|
||||
{
|
||||
$columns[] = 'upload_file_type';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_medium_name' ) )
|
||||
{
|
||||
$columns[] = 'upload_medium_name';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_title' ) )
|
||||
{
|
||||
$columns[] = 'upload_title';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_description' ) )
|
||||
{
|
||||
$columns[] = 'upload_description';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_copyright' ) )
|
||||
{
|
||||
$columns[] = 'upload_copyright';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_exif' ) )
|
||||
{
|
||||
$columns[] = 'upload_exif';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_feature_flag' ) )
|
||||
{
|
||||
$columns[] = 'upload_feature_flag';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_geodata' ) )
|
||||
{
|
||||
$columns[] = 'upload_geodata';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_media_data' ) )
|
||||
{
|
||||
$columns[] = 'upload_media_data';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->checkForColumn( 'gallery_images_uploads', 'upload_thumbnail' ) )
|
||||
{
|
||||
$columns[] = 'upload_thumbnail';
|
||||
}
|
||||
|
||||
if( \count( $columns ) )
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( 'gallery_images_uploads', $columns );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Removing unused database columns";
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,812 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"name": "category_club_id",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The club ID if this category belongs to a club, or NULL",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"name": "image_meta_data",
|
||||
"type": "BIT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_use_comments",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "1",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_use_reviews",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_comments",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_comments_hidden",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_comments_unapproved",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_reviews",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_reviews_hidden",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"10": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_reviews_unapproved",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"11": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_meta_data",
|
||||
"type": "BIT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"12": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "gallery_album_comments",
|
||||
"columns": {
|
||||
"comment_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "comment_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_edit_time": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "comment_edit_time",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_author_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "comment_author_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_author_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "comment_author_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_ip_address": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 46,
|
||||
"name": "comment_ip_address",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_post_date": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "comment_post_date",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_text": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "comment_text",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_approved": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 4,
|
||||
"name": "comment_approved",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_album_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "comment_album_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_append_edit": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "comment_append_edit",
|
||||
"type": "TINYINT",
|
||||
"unsigned": true,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"comment_edit_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "comment_edit_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_id"
|
||||
]
|
||||
},
|
||||
"author_id": {
|
||||
"type": "key",
|
||||
"name": "author_id",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_author_id"
|
||||
]
|
||||
},
|
||||
"post_date": {
|
||||
"type": "key",
|
||||
"name": "post_date",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_post_date"
|
||||
]
|
||||
},
|
||||
"img_id": {
|
||||
"type": "key",
|
||||
"name": "img_id",
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_album_id",
|
||||
"comment_post_date"
|
||||
]
|
||||
},
|
||||
"comment_ip_address": {
|
||||
"type": "key",
|
||||
"name": "comment_ip_address",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_ip_address"
|
||||
]
|
||||
},
|
||||
"comment_approved": {
|
||||
"type": "key",
|
||||
"name": "comment_approved",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"comment_approved"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"13": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "gallery_album_reviews",
|
||||
"columns": {
|
||||
"review_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 20,
|
||||
"name": "review_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_author": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_author",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_author_name": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 255,
|
||||
"name": "review_author_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_content": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "review_content",
|
||||
"type": "MEDIUMTEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_date": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_date",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_ip_address": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 46,
|
||||
"name": "review_ip_address",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_time": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_edit_time",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_member_name": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 255,
|
||||
"name": "review_edit_member_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_edit_show": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "review_edit_show",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_rating": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_rating",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_total": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_votes_total",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_helpful": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_votes_helpful",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_votes_data": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "review_votes_data",
|
||||
"type": "TEXT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_approved": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "review_approved",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"review_album_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "review_album_id",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_id"
|
||||
]
|
||||
},
|
||||
"review_approved": {
|
||||
"type": "key",
|
||||
"name": "review_approved",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_approved"
|
||||
]
|
||||
},
|
||||
"review_ip": {
|
||||
"type": "key",
|
||||
"name": "review_ip",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_ip_address"
|
||||
]
|
||||
},
|
||||
"review_author": {
|
||||
"type": "key",
|
||||
"name": "review_author",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"review_author"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"14": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_last_comment",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"15": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_last_review",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"16": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_locked",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"17": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_featured",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"18": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_hidden",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"category_sort_options": "album_count_imgs"
|
||||
},
|
||||
[
|
||||
"category_sort_options=?",
|
||||
"album_count_images"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"category_sort_options": "album_last_img_date"
|
||||
},
|
||||
[
|
||||
"category_sort_options=?",
|
||||
"updated"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"category_sort_options": "album_name"
|
||||
},
|
||||
[
|
||||
"category_sort_options=?",
|
||||
"title"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.2.2 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 26 Jul 2017
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_102005;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.2.2 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Recount containers
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\gallery\Album', 'count' => 0 ), 5, array( 'class' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,175 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_submit_type",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "Submission type. 0=owner only, 1=anyone, 2=specific groups, 3=specific members, 4=club",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_submit_access",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_album_reviews",
|
||||
{
|
||||
"name": "review_author_response",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images_uploads",
|
||||
{
|
||||
"name": "upload_order",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_reviews",
|
||||
{
|
||||
"name": "review_author_response",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"gallery_images_uploads",
|
||||
"upload_session",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "upload_session",
|
||||
"columns": [
|
||||
"upload_session",
|
||||
"upload_order"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"7": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"name": "category_sort_options_img",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"8": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"gallery_album_reviews",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "review_album_id",
|
||||
"columns": [
|
||||
"review_album_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"9": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"gallery_reviews",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "review_image",
|
||||
"columns": [
|
||||
"review_image_id",
|
||||
"review_approved"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.0 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 03 Nov 2017
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_103000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Delete copies of images we no longer need, and rebuild the sizes array
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Task::queue( 'gallery', 'CleanUpGalleryImages', array(), 5 );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.0 Beta 4 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 09 Apr 2018
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_103004;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.0 Beta 4 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Initialize a search index rebuild for gallery images
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Image' ), 5 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"core_sys_lang_words",
|
||||
[
|
||||
"word_key=?",
|
||||
"gallery_use_square_thumbnails_desc"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"category_sort_options": "album_last_img_date"
|
||||
},
|
||||
[
|
||||
"category_sort_options IS NULL"
|
||||
]
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_categories",
|
||||
{
|
||||
"category_sort_options_img": "updated"
|
||||
},
|
||||
[
|
||||
"category_sort_options_img IS NULL"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.3.4 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 24 May 2018
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_103021;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.3.4 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Get rid of the duplicate setting
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_groups' ), 'IPS\Member\Group' ) as $group )
|
||||
{
|
||||
if( $group->g_delete_own_albums AND $group->g_delete_own_posts != 1 )
|
||||
{
|
||||
$classes = explode( ',', $group->g_delete_own_posts );
|
||||
|
||||
if( !\in_array( 'IPS\gallery\Album\Item', $classes ) )
|
||||
{
|
||||
$classes[] = 'IPS\gallery\Album\Item';
|
||||
\IPS\Db::i()->update( 'core_groups', array( 'g_delete_own_posts' => implode( ',', $classes ) ), array( 'g_id=?', $group->g_id ) );
|
||||
}
|
||||
}
|
||||
elseif( !$group->g_delete_own_albums AND $group->g_delete_own_posts == 1 )
|
||||
{
|
||||
$contentClasses = array( 'IPS\core\Messenger\Conversation' );
|
||||
foreach ( \IPS\Application::allExtensions( 'core', 'ContentRouter', $group, NULL, NULL, FALSE ) as $extension )
|
||||
{
|
||||
/* It's possible when upgrading from 3.x that the modules table isn't populated, some extensions (clubs)
|
||||
* Will throw an exception in this situation
|
||||
*/
|
||||
try
|
||||
{
|
||||
$class = new $extension;
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $class->classes as $class )
|
||||
{
|
||||
if ( isset( $class::$databaseColumnMap['author'] ) AND $class != 'IPS\gallery\Album\Item' )
|
||||
{
|
||||
$contentClasses[] = $class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'core_groups', array( 'g_delete_own_posts' => implode( ',', $contentClasses ) ), array( 'g_id=?', $group->g_id ) );
|
||||
}
|
||||
elseif( !$group->g_delete_own_albums AND $group->g_delete_own_posts != 1 AND \in_array( 'IPS\gallery\Album\Item', explode( ',', $group->g_delete_own_posts ) ) )
|
||||
{
|
||||
$classes = array_filter( explode( ',', $group->g_delete_own_posts ), function( $className ) {
|
||||
return $className != 'IPS\gallery\Album\Item';
|
||||
} );
|
||||
|
||||
\IPS\Db::i()->update( 'core_groups', array( 'g_delete_own_posts' => implode( ',', $classes ) ), array( 'g_id=?', $group->g_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Db::i()->dropColumn( 'core_groups', 'g_delete_own_albums' );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Removing duplicate setting";
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_description",
|
||||
{
|
||||
"name": "image_description",
|
||||
"type": "MEDIUMTEXT",
|
||||
"length": 0,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"album_sort_options": "updated"
|
||||
},
|
||||
[
|
||||
"album_sort_options IS NULL OR album_sort_options=''"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_last_comment=image_date",
|
||||
[
|
||||
"image_last_comment=?",
|
||||
0
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"core_groups",
|
||||
{
|
||||
"name": "g_download_original",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"null": false,
|
||||
"default": 0,
|
||||
"unsigned": true,
|
||||
"comment": "Can this group download the original image?"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.4.0 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 12 Oct 2018
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_104000;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.4.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Set the new "can download original images" column default value appropriately
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
if( \IPS\Settings::i()->gallery_use_watermarks )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_groups', array( 'g_download_original' => \IPS\gallery\Image::DOWNLOAD_ORIGINAL_WATERMARKED ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_groups', array( 'g_download_original' => \IPS\gallery\Image::DOWNLOAD_ORIGINAL_RAW ) );
|
||||
}
|
||||
|
||||
unset( \IPS\Data\Store::i()->groups );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Setting new gallery group permissions";
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up orphaned club albums
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
/* Build query WHERE clause */
|
||||
$existingCategories = iterator_to_array( \IPS\Db::i()->select( 'category_id', 'gallery_categories' ) );
|
||||
$where = array( \IPS\Db::i()->in( 'album_category_id', $existingCategories , TRUE) );
|
||||
|
||||
/* Do we even have any? Most won't */
|
||||
if( !\IPS\Db::i()->select( 'COUNT(*)', 'gallery_albums', $where )->first() )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Create a temporary category to place these albums in */
|
||||
$category = new \IPS\gallery\Category;
|
||||
|
||||
$category->saveForm( $category->formatFormValues( array(
|
||||
'category_name' => "Orphaned Albums",
|
||||
'category_description' => "Temporary category holding orphaned albums which will be removed automatically",
|
||||
'category_parent_id' => 0,
|
||||
'category_sort_options' => 'updated',
|
||||
'category_allow_albums' => 1
|
||||
) ) );
|
||||
$newCategoryId = $category->_id;
|
||||
|
||||
/* Loop over albums, move to the new category, and then add a bg task to delete the album */
|
||||
foreach ( \IPS\Db::i()->select( 'album_id', 'gallery_albums', $where ) as $albumId )
|
||||
{
|
||||
/* "Move" the albums and images to the new category */
|
||||
\IPS\Db::i()->update( 'gallery_albums', array( 'album_category_id' => $newCategoryId ), array( 'album_id=?', $albumId ) );
|
||||
\IPS\Db::i()->update( 'gallery_images', array( 'image_category_id' => $newCategoryId ), array( 'image_album_id=?', $albumId ) );
|
||||
|
||||
/* Add the bg task */
|
||||
\IPS\Task::queue( 'core', 'DeleteOrMoveContent', array( 'class' => 'IPS\gallery\Album', 'id' => $albumId, 'deleteWhenDone' => TRUE ), 4 );
|
||||
}
|
||||
|
||||
/* And then add a bg task to delete our new category after the albums are deleted */
|
||||
\IPS\Task::queue( 'core', 'DeleteOrMoveContent', array( 'class' => 'IPS\gallery\Category', 'id' => $newCategoryId, 'deleteWhenDone' => TRUE ), 5 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Removing orphaned albums";
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "album_comment"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Image\\Comment"
|
||||
]
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "album_review"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Image\\Review"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "album_comment"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Album\\Comment"
|
||||
]
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "album_review"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Album\\Review"
|
||||
]
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "comment_id"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Image\\Comment"
|
||||
]
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_reputation_index",
|
||||
{
|
||||
"type": "review_id"
|
||||
},
|
||||
[
|
||||
"rep_class=?",
|
||||
"IPS\\gallery\\Image\\Review"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.4.4 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Gallery
|
||||
* @since 03 May 2019
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_104026;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.4.4 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Rebuild search index
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
\IPS\Content\Search\Index::i()->removeApplicationContent( \IPS\Application::load('gallery') );
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Image' ), 5, TRUE );
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Image\Comment' ), 5, TRUE );
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Image\Review' ), 5, TRUE );
|
||||
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Item' ), 5, TRUE );
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Comment' ), 5, TRUE );
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Review' ), 5, TRUE );
|
||||
}
|
||||
}
|
||||
@@ -12,30 +12,37 @@
|
||||
namespace IPS\gallery\setup\upg_107683;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\gallery\Album;
|
||||
use IPS\Task;
|
||||
use UnderflowException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.10 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
public function step1() : bool|array
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( '*', 'gallery_albums', [ 'album_type!=?', \IPS\gallery\Album::AUTH_TYPE_PUBLIC ], NULL, 1 )->first();
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Item' ), 5, TRUE );
|
||||
Db::i()->select( '*', 'gallery_albums', [ 'album_type!=?', Album::AUTH_TYPE_PUBLIC ], NULL, 1 )->first();
|
||||
Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Item' ), 5, TRUE );
|
||||
}
|
||||
catch( \UnderflowException $e ) {}
|
||||
catch( UnderflowException $e ) {}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "album_views",
|
||||
"type": "BIGINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -12,16 +12,23 @@
|
||||
namespace IPS\gallery\setup\upg_107690;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\gallery\Album;
|
||||
use IPS\Task;
|
||||
use UnderflowException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.11 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
@@ -32,10 +39,10 @@ class _Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( '*', 'gallery_albums', [ 'album_type!=?', \IPS\gallery\Album::AUTH_TYPE_PUBLIC ], NULL, 1 )->first();
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Item' ), 5, TRUE );
|
||||
Db::i()->select( '*', 'gallery_albums', [ 'album_type!=?', Album::AUTH_TYPE_PUBLIC ], NULL, 1 )->first();
|
||||
Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\gallery\Album\Item' ), 5, TRUE );
|
||||
}
|
||||
catch( \UnderflowException $e ) {}
|
||||
catch( UnderflowException $e ) {}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107702,
|
||||
"name": "4.7.12 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
"image_file_size",
|
||||
"gallery_albums",
|
||||
{
|
||||
"name": "image_file_size",
|
||||
"name": "album_views",
|
||||
"type": "BIGINT",
|
||||
"length": 20,
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "image_file_size",
|
||||
"columns": [
|
||||
"image_file_size"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "image_views",
|
||||
"columns": [
|
||||
"image_views"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107748,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107750,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107751,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107760,
|
||||
"name": "4.7.17 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107774,
|
||||
"name": "4.7.18",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107775,
|
||||
"name": "4.7.18",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107780,
|
||||
"name": "4.7.19 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107781,
|
||||
"name": "4.7.19 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107782,
|
||||
"name": "4.7.19 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107783,
|
||||
"name": "4.7.19 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107785,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107786,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107787,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107795,
|
||||
"name": "4.7.20 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107796,
|
||||
"name": "4.7.20 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107797,
|
||||
"name": "4.7.20 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107798,
|
||||
"name": "4.7.20 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107799,
|
||||
"name": "4.7.20 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107800,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107801,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107802,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107810,
|
||||
"name": "4.7.21 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107815,
|
||||
"name": "4.7.22 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"id": 107816,
|
||||
"name": "4.7.22 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
Loaded 100 of 6736 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user