Version 4.3.0

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

No files matched your search

@@ -0,0 +1,15 @@
{
"1": {
"method": "update",
"params": [
"gallery_categories",
{
"category_sort_options": "album_name"
},
[
"category_sort_options=?",
"title"
]
]
}
}
@@ -0,0 +1,37 @@
<?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;
}
}
@@ -0,0 +1,175 @@
{
"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
]
}
]
}
}
@@ -0,0 +1,36 @@
<?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;
}
}
@@ -0,0 +1,40 @@
<?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
}
@@ -1,19 +1,12 @@
{
"1": {
"method": "delete",
"params": [
"custom_bbcode",
"bbcode_tag='gallery' AND bbcode_php_plugin='gallery.php'"
]
},
"2": {
"method": "delete",
"params": [
"core_sys_conf_settings",
"conf_key='gallery_create_thumbs'"
]
},
"3": {
"2": {
"method": "changeColumn",
"params": [
"gallery_comments",
@@ -27,7 +20,7 @@
}
]
},
"4": {
"3": {
"method": "changeColumn",
"params": [
"gallery_images",
@@ -41,7 +34,7 @@
}
]
},
"5": {
"4": {
"method": "dropColumn",
"params": [
"gallery_comments",
@@ -53,7 +46,7 @@
]
]
},
"6": {
"5": {
"method": "addColumn",
"params": [
"gallery_albums_main",
@@ -0,0 +1,48 @@
<?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 17 Oct 2017
*/
namespace IPS\gallery\setup\upg_41000;
/* 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
{
/**
* ...
*
* @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\Db::i()->delete( 'custom_bbcode', array( 'bbcode_tag=? AND bbcode_php_plugin=?', 'gallery', 'gallery.php' ) );
}
catch ( \IPS\Db\Exception $e )
{
/* This table may not exist, depending on the version they are upgrading from */
if( $e->getCode() != 1146 )
{
throw $e;
}
}
return TRUE;
}
}
@@ -17,6 +17,9 @@ if( \IPS\Db::i()->checkForTable( 'gallery_albums_main' ) )
{
$_options = iterator_to_array( \IPS\Db::i()->select( 'album_id, album_name', 'gallery_albums_main', 'album_is_global=1 AND album_node_level=0' )->setKeyField('album_id')->setValueField('album_name') );
$options[] = new \IPS\Helpers\Form\Select( '42000_members_album', 0, TRUE, array( 'options' => $_options ) );
$options[] = new \IPS\Helpers\Form\Checkbox( '42000_new_members_album', 1, FALSE );
if( !empty( $_options ) )
{
$options[] = new \IPS\Helpers\Form\Select( '42000_members_album', 0, TRUE, array( 'options' => $_options ) );
$options[] = new \IPS\Helpers\Form\Checkbox( '42000_new_members_album', 1, FALSE );
}
}
@@ -502,7 +502,7 @@ class _Upgrade
\IPS\Settings::i()->gallery_members_album = 0;
}
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->clearCache();
//-----------------------------------------
// Get global albums and loop
@@ -678,8 +678,7 @@ class _Upgrade
\IPS\Db::i()->delete( 'gallery_albums_main', 'album_is_global=1' );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => \IPS\Settings::i()->gallery_members_album ), array( 'conf_key=?', 'gallery_members_album' ) );
unset( \IPS\Data\Store::i()->settings );
\IPS\Settings::i()->changeValues( array( 'gallery_members_album' => \IPS\Settings::i()->gallery_members_album ) );
return TRUE;
}
@@ -304,11 +304,11 @@ class _Upgrade
{
$url = \IPS\File::create( 'gallery_Images', $fileName, file_get_contents( $settings['gallery_watermark_path'] ), NULL, TRUE, NULL, FALSE );
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $url ), array( 'conf_key=?', 'gallery_watermark_path' ) );
\IPS\Settings::i()->changeValues( array( 'gallery_watermark_path' => $url ) );
}
catch( \Exception $e )
{
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => '' ), array( 'conf_key=?', 'gallery_watermark_path' ) );
\IPS\Settings::i()->changeValues( array( 'gallery_watermark_path' => '' ) );
}
}
@@ -316,7 +316,8 @@ class _Upgrade
\IPS\Db::i()->delete( 'core_sys_conf_settings', "conf_key IN ( 'gallery_watermark_opacity', 'gallery_images_url', 'gallery_images_path' )" );
unset( \IPS\Data\Store::i()->settings, $_SESSION['_step3Count'] );
unset( $_SESSION['_step3Count'] );
\IPS\Settings::i()->clearCache();
return TRUE;
}