Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -176,7 +176,8 @@
|
||||
"perm_2": "*",
|
||||
"perm_3": "<%NO_GUESTS%>",
|
||||
"perm_4": "<%NO_GUESTS%>",
|
||||
"perm_5": "<%NO_GUESTS%>"
|
||||
"perm_5": "<%NO_GUESTS%>",
|
||||
"perm_6": "<%NO_GUESTS%>"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class _Upgrade
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step3Count'] );
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
{
|
||||
"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",
|
||||
"engine": "MyISAM"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.0 Beta 1 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 25 Sep 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
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 ) )
|
||||
{
|
||||
$mr = \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' => $mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing broken gallery image paths";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"gallery_images",
|
||||
{
|
||||
"image_metadata": null
|
||||
},
|
||||
[
|
||||
"image_metadata=?",
|
||||
"false"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.0 RC 1 Upgrade Code
|
||||
* @brief 4.1.0 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
@@ -10,7 +10,7 @@
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\gallery\setup\upg_100011;
|
||||
namespace IPS\gallery\setup\upg_101006;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -42,12 +42,12 @@ class _Upgrade
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'gallery_categories' ) as $category )
|
||||
{
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}", html_entity_decode( $category['category_name'], ENT_QUOTES, 'UTF-8' ) );
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}_desc", html_entity_decode( $category['category_description'], ENT_QUOTES, 'UTF-8' ) );
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}", \IPS\Text\Parser::utf8mb4SafeDecode( $category['category_name'] ) );
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}_desc", \IPS\Text\Parser::utf8mb4SafeDecode( $category['category_description'] ) );
|
||||
|
||||
$_rules = unserialize( $category['category_rules'] );
|
||||
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}_rulestitle", html_entity_decode( $_rules['title'], ENT_QUOTES, 'UTF-8' ) );
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}_rulestitle", \IPS\Text\Parser::utf8mb4SafeDecode( $_rules['title'] ) );
|
||||
\IPS\Lang::saveCustom( 'gallery', "gallery_category_{$category['category_id']}_rules", \IPS\Text\Parser::parseStatic( $_rules['text'], TRUE, NULL, NULL, TRUE, TRUE, TRUE ) );
|
||||
|
||||
$_sort = unserialize( $category['category_sort_options'] );
|
||||
@@ -315,7 +315,7 @@ class _Upgrade
|
||||
|
||||
\IPS\Db::i()->dropColumn( 'gallery_images', array( 'image_thumbnail', 'image_directory', 'image_media_thumb' ) );
|
||||
|
||||
\IPS\Db::i()->delete( 'core_sys_conf_settings', "conf_key IN ( 'gallery_watermark_path', 'gallery_watermark_opacity', 'gallery_images_url', 'gallery_images_path' )" );
|
||||
\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'] );
|
||||
|
||||
@@ -670,7 +670,6 @@ class _Upgrade
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\gallery\Image' ), 2 );
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\gallery\Image\Comment' ), 2 );
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\forums\Topic\ArchivedPost' ), 2 );
|
||||
\IPS\Task::queue( 'core', 'RebuildNonContentPosts', array( 'extension' => 'gallery_Categories' ), 2 );
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user