Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Beta 3 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 24 Nov 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100003;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Beta 5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100008;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Beta 6 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100010;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Beta 7 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 30 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100011;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 15 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100015;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Beta 6 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100018;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100023;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.2 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 15 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100025;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.3 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 20 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100026;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 5 May 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100028;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.5 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 20 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100030;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.9 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 19 Jun 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100035;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.11 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 14 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100041;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.13 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 30 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100044;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.13 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 30 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101000;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.6 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 11 Dec 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101021;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.9 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 28 Jan 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101026;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 08 Apr 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101034;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.15 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Pages
* @since 25 Aug 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101056;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.16 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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}
* @since 28 Sep 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101064;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.17 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Pages
* @since 26 Oct 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101071;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.18 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Pages
* @since 03 Jan 2017
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101079;
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.18.1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Pages
* @since 20 Jan 2017
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101088;
+15 -6
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.1.19 Beta 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Pages
* @since 15 Feb 2017
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_101090;
@@ -25,7 +24,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
class _Upgrade
{
/**
* ...
* Adjust record edit time
*
* @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)
*/
@@ -38,4 +37,14 @@ class _Upgrade
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Fixing record last edit time for databases";
}
}
@@ -0,0 +1,22 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_database_fields",
{
"name": "field_allow_attachments",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "1",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
@@ -0,0 +1,52 @@
<?php
/**
* @brief 4.2.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 Pages
* @since 12 Apr 2017
*/
namespace IPS\cms\setup\upg_101100;
/* 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.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Fix multiple member fields
*
* @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()
{
/* Loop over any Member fields that allow multiple users */
foreach( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_type=? AND field_is_multiple=?', 'Member', 1 ) ) as $field )
{
/* Then run an update query using REPLACE() on the Pages database to fix the field */
\IPS\Db::i()->update( 'cms_custom_database_' . $field['field_database_id'], "field_{$field['field_id']}=REPLACE(field_{$field['field_id']},',','\\n')" );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Fixing multiple member fields in Pages databases";
}
}
@@ -0,0 +1,46 @@
<?php
/**
* @brief 4.2.0 Beta 3 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 Pages
* @since 18 May 2017
*/
namespace IPS\cms\setup\upg_101105;
/* 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.0 Beta 3 Upgrade Code
*/
class _Upgrade
{
/**
* Fix customized templates to ensure reactions show
*
* @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()
{
/* Update records templates */
foreach( \IPS\Db::i()->select( '*', 'cms_templates', array( "template_content LIKE '%settings.reputation_enabled%'" ) ) as $row )
{
if ( preg_match( '#\$record\s+?instanceof\s+?\\\IPS\\\Content\\\Reputation#i', $row['template_content'] ) )
{
$row['template_content'] = preg_replace( '#\$record\s+?instanceof\s+?\\\IPS\\\Content\\\Reputation#i', '\IPS\IPS::classUsesTrait( $record, \'IPS\Content\Reactable\' )', $row['template_content'] );
\IPS\Db::i()->update( 'cms_templates', array( 'template_content' => $row['template_content'] ), array( 'template_id=?', $row['template_id'] ) );
}
}
return TRUE;
}
}
@@ -0,0 +1,82 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "cms_database_fields_thumbnails",
"columns": {
"thumb_original_location": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 255,
"name": "thumb_original_location",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"thumb_location": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 255,
"name": "thumb_location",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"thumb_field_id": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "thumb_field_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"thumb_database_id": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "thumb_database_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"thumb_original_location"
]
}
},
"collation": "utf8_general_ci",
"engine": "InnoDB"
}
]
}
}
+4 -5
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11002;
+4 -5
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11003;
+4 -5
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
* @note Do we need to import articles db?
*/
@@ -564,7 +564,7 @@
"memory_url"
],
"length": [
0
150
]
}
}
+4 -5
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_23002;
+4 -5
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief Upgrader: Custom Upgrade Options
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 3 Mar 2015
* @version SVN_VERSION_NUMBER
*/
$options = array();
+19 -18
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief 4.0.0 Alpha 1 Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @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 Content
* @since 20 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_40000;
@@ -124,7 +123,7 @@ class _Upgrade
{
if( $database['database_is_articles'] AND mb_strpos( $page['page_content'], "{parse articles" ) !== FALSE )
{
if( isset( $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] != $page['page_id'] )
if( isset( $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] != $page['page_id'] )
{
$page['page_content'] = preg_replace( "/\{parse articles.*?\}/i", "", $page['page_content'] );
}
@@ -132,7 +131,7 @@ class _Upgrade
if( mb_strpos( $page['page_content'], "{parse database=\"{$database['database_id']}\"" ) !== FALSE )
{
if( isset( $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] != $page['page_id'] )
if( isset( $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] != $page['page_id'] )
{
$page['page_content'] = preg_replace( "/\{parse database=\"{$database['database_id']}\".*?\}/i", "", $page['page_content'] );
}
@@ -140,7 +139,7 @@ class _Upgrade
if( mb_strpos( $page['page_content'], "{parse database=\"{$database['database_key']}\"" ) !== FALSE )
{
if( isset( $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms'][40000]['database_page_' . $database['database_id'] ] != $page['page_id'] )
if( isset( $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] ) AND $_SESSION['upgrade_options']['cms']['40000']['database_page_' . $database['database_id'] ] != $page['page_id'] )
{
$page['page_content'] = preg_replace( "/\{parse database=\"{$database['database_key']}\".*?\}/i", "", $page['page_content'] );
}
@@ -349,16 +348,8 @@ class _Upgrade
*/
public function step3()
{
$admins = array();
foreach( \IPS\Member\Group::groups( TRUE ) as $group )
{
if ( $group->g_access_cp )
{
$admins[] = $group->g_id;
}
}
$admins = array_keys( \IPS\Member::administrators()['g'] );
/* Fields */
foreach( \IPS\Db::i()->select( '*', 'cms_database_fields' ) as $field )
{
@@ -540,6 +531,7 @@ class _Upgrade
$fields = iterator_to_array( \IPS\Db::i()->select( '*', 'cms_database_fields', array( "field_database_id=? AND field_key IN( '" . implode( "','", array_keys( $keys ) ) . "') ", $database['database_id'] ) )->setKeyField('field_key') );
$json = array();
$drop = array();
$remap = array();
foreach( $keys as $k => $schema )
{
@@ -557,6 +549,7 @@ class _Upgrade
list( $field, ) = explode( ' ', $schema );
$drop[] = $fields[ $k ]['field_id'];
$remap[ 'field_' . $fields[ $k ]['field_id'] ] = $field;
if ( $field )
{
@@ -600,6 +593,14 @@ class _Upgrade
{
\IPS\Db::i()->delete( 'cms_database_fields', array( "field_database_id=? AND field_id IN(" . implode( ",", $drop ) . ")", $database['database_id'] ) );
}
if( count( $remap ) )
{
if( in_array( $database['database_field_sort'], array_keys( $remap ) ) )
{
$save['database_field_sort'] = $remap[ $database['database_field_sort'] ];
}
}
}
$save['database_field_title'] = str_replace( 'field_', '', $database['database_field_title'] );