Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

View File
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,111 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_database_fields",
{
"name": "field_display_json",
"type": "MEDIUMTEXT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "JSON array of custom display HTML",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "addColumn",
"params": [
"cms_database_comments",
{
"name": "comment_edit_reason",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"3": {
"method": "addColumn",
"params": [
"cms_database_comments",
{
"name": "comment_edit_member_name",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"4": {
"method": "addColumn",
"params": [
"cms_database_comments",
{
"name": "comment_edit_member_id",
"type": "INT",
"length": 10,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"5": {
"method": "addColumn",
"params": [
"cms_database_comments",
{
"name": "comment_edit_show",
"type": "SMALLINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"6": {
"method": "update",
"params": [
"cms_database_fields",
{
"field_display_json": "{\"display\":{\"method\":\"none\",\"html\":\"\"},\"listing\":{\"method\":\"1\",\"html\":\"\",\"right\":false}}"
}
]
}
}
@@ -0,0 +1,63 @@
<?php
/**
* @brief 4.0.0 Beta 3 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 24 Nov 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100003;
/* 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 Beta 3 Upgrade Code
*
*/
class _Upgrade
{
/**
* Step 1
* Remove any fulltext indices
*
* @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( \IPS\Db::i()->select( 'database_id, database_database', 'cms_databases' ) as $database )
{
if( \IPS\Db::i()->checkForTable( 'cms_custom_database_' . $database['database_id'] ) )
{
$tableDefinition = \IPS\Db::i()->getTableDefinition( 'cms_custom_database_' . $database['database_id'] );
foreach( $tableDefinition['indexes'] as $name => $indexDefinition )
{
if( $indexDefinition['type'] == 'fulltext' )
{
\IPS\Db::i()->dropIndex( 'cms_custom_database_' . $database['database_id'], $indexDefinition['name'] );
}
}
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Removing unused fulltext indices";
}
}
Whitespace-only changes.
@@ -0,0 +1,42 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_database_categories",
{
"name": "category_template_listing",
"type": "VARCHAR",
"length": 250,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "addColumn",
"params": [
"cms_database_categories",
{
"name": "category_template_display",
"type": "VARCHAR",
"length": 250,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,22 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_databases",
{
"name": "database_fixed_field_settings",
"type": "MEDIUMTEXT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,52 @@
<?php
/**
* @brief 4.0.0 Beta 5 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 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100008;
/* 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 Beta 5 Upgrade Code
*
*/
class _Upgrade
{
/**
* Step 1
* Convert menu titles to translatable lang strings
*
* @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 ( \IPS\Db::i()->select( '*', 'cms_page_menu' ) as $menu )
{
\IPS\Lang::saveCustom( 'cms', "cms_menu_title_" . $menu['menu_id'], $menu['menu_title'] );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Converting menu titles to translatable fields";
}
}
Whitespace-only changes.
@@ -0,0 +1,159 @@
<?php
/**
* @brief 4.0.0 Beta 6 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 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100010;
/* 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 Beta 5 Upgrade Code
*
*/
class _Upgrade
{
/**
* Step 1
* Convert menu titles to translatable lang strings
*
* @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()
{
$menu = array();
foreach( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
{
foreach( \IPS\Lang::languages() as $id => $lang )
{
try
{
$base = $lang->get('cms_create_menu_records_x');
}
catch ( \UnderflowException $e )
{
$base = "%s in %s"; // If upgrading from 3.x it won't exist yet
}
$menu[ $lang->_id ] = \sprintf( $base, $lang->get("content_db_lang_su_" . $db['database_id'] ), $lang->get('content_db_' . $db['database_id'] ) );
}
\IPS\Lang::saveCustom( 'cms', "cms_create_menu_records_" . $db['database_id'], $menu );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Storing create menu translations";
}
/**
* Step 2
* When upgrading from 3.x a database may be configured so that primary_id_field (or similar) is the content or title field..
*
* @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()
{
foreach( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
{
$updates = array();
if( !is_numeric( $db['database_field_title'] ) or !is_numeric( $db['database_field_content'] ) )
{
$definition = \IPS\Db::i()->getTableDefinition( 'cms_custom_database_' . $db['database_id'] );
$fields = array();
/* Figure out which field_xx columns are available */
foreach( $definition['columns'] as $k => $v )
{
if( mb_strpos( $v['name'], 'field_' ) === 0 )
{
$fields[] = str_replace( 'field_', '', $v['name'] );
}
}
/* Do we need to reset the title field, i.e. if it was mapped to primary_id_field? */
if( !is_numeric( $db['database_field_title'] ) AND count( $fields ) )
{
$updates['database_field_title'] = $fields[0];
/* If there are other fields to use, remove this one from the array */
if( count( $fields ) > 1 )
{
unset( $fields[0] );
}
}
/* Do we need to reset the content field, i.e. if it was mapped to primary_id_field? */
if( !is_numeric( $db['database_field_content'] ) AND count( $fields ) )
{
$updates['database_field_content'] = array_shift( $fields );
}
}
/* If we have any changes, store them */
if( count( $updates ) )
{
\IPS\Db::i()->update( 'cms_databases', $updates, array( 'database_id=?', $db['database_id'] ) );
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Fixing misconfigured databases";
}
/**
* Step 3
* Convert page titles to translatable lang strings
*
* @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 step3()
{
foreach ( \IPS\Db::i()->select( '*', 'cms_pages' ) as $page )
{
\IPS\Lang::saveCustom( 'cms', "cms_page_" . $page['page_id'], $page['page_name'] );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step3CustomTitle()
{
return "Converting page titles to translatable fields";
}
}
Whitespace-only changes.
@@ -0,0 +1,22 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_url_store",
{
"name": "store_path",
"type": "TEXT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
@@ -0,0 +1,362 @@
<?php
/**
* @brief 4.0.0 Beta 7 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 30 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100011;
/* 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 Beta 7 Upgrade Code
*
*/
class _Upgrade
{
/**
* Step 1
* Convert menu titles to translatable lang strings
*
* @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\Db::i()->update( 'cms_templates', "template_content=REPLACE(template_content, '{image=', '{resource=' )" );
\IPS\Data\Cache::i()->clearAll();
\IPS\Data\Store::i()->clearAll();
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Converting image plugin to resource plugin in database templates";
}
/**
* Step 2
* Remove old database tables 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 step2()
{
if( \IPS\Db::i()->checkForTable('ccs_attachments_map') )
{
\IPS\Db::i()->dropTable( 'ccs_attachments_map' );
}
if( \IPS\Db::i()->checkForTable('ccs_block_wizard') )
{
\IPS\Db::i()->dropTable( 'ccs_block_wizard' );
}
if( \IPS\Db::i()->checkForTable('ccs_database_moderators') )
{
\IPS\Db::i()->dropTable( 'ccs_database_moderators' );
}
if( \IPS\Db::i()->checkForTable('ccs_database_modqueue') )
{
\IPS\Db::i()->dropTable( 'ccs_database_modqueue' );
}
if( \IPS\Db::i()->checkForTable('ccs_database_ratings') )
{
\IPS\Db::i()->dropTable( 'ccs_database_ratings' );
}
if( \IPS\Db::i()->checkForTable('ccs_menus') )
{
\IPS\Db::i()->dropTable( 'ccs_menus' );
}
if( \IPS\Db::i()->checkForTable('ccs_page_templates') )
{
\IPS\Db::i()->dropTable( 'ccs_page_templates' );
}
if( \IPS\Db::i()->checkForTable('ccs_page_wizard') )
{
\IPS\Db::i()->dropTable( 'ccs_page_wizard' );
}
if( \IPS\Db::i()->checkForTable('ccs_revisions') )
{
\IPS\Db::i()->dropTable( 'ccs_revisions' );
}
if( \IPS\Db::i()->checkForTable('ccs_slug_memory') )
{
\IPS\Db::i()->dropTable( 'ccs_slug_memory' );
}
if( \IPS\Db::i()->checkForTable('ccs_template_blocks') )
{
\IPS\Db::i()->dropTable( 'ccs_template_blocks' );
}
if( \IPS\Db::i()->checkForTable('ccs_template_cache') )
{
\IPS\Db::i()->dropTable( 'ccs_template_cache' );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Removing old database tables";
}
/**
* Step 3
* Remove old stuff from tables we retained
*
* @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 step3()
{
/* A previous upgrader bug may have prevented this column from being added - #2296 */
if( !\IPS\Db::i()->checkForColumn( 'cms_databases', 'database_fixed_field_settings' ) )
{
\IPS\Db::i()->addColumn( 'cms_databases', array( 'name' => 'database_fixed_field_settings', 'type' => 'MEDIUMTEXT', 'allow_null' => true, 'default' => null ) );
}
\IPS\Db::i()->update( 'cms_databases', array( 'database_fixed_field_settings' => '{"record_image":{"image_dims":[0,0],"thumb_dims":["200","200"]}}' ), array( 'database_fixed_field_settings IS NULL OR database_fixed_field_settings=?', '' ) );
\IPS\Db::i()->update( 'cms_databases', array( 'database_featured_settings' => '{"featured":false,"perpage":10,"pagination":false,"sort":"record_publish_date","direction":"desc","categories":0}' ), array( 'database_featured_settings IS NULL OR database_featured_settings=?', '' ) );
/* Database categories */
$columns = array();
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_description' ) )
{
$columns[] = "category_description";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_rss' ) )
{
$columns[] = "category_rss";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_rss_cache' ) )
{
$columns[] = "category_rss_cache";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_rss_cached' ) )
{
$columns[] = 'category_rss_cached';
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_rss_exclude' ) )
{
$columns[] = "category_rss_exclude";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_template' ) )
{
$columns[] = "category_template";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_tags_override' ) )
{
$columns[] = "category_tags_override";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_tags_enabled' ) )
{
$columns[] = "category_tags_enabled";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_tags_noprefixes' ) )
{
$columns[] = "category_tags_noprefixes";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_categories', 'category_tags_predefined' ) )
{
$columns[] = "category_tags_predefined";
}
if( count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_database_categories', $columns );
}
/* Fields */
$columns = array();
if( \IPS\Db::i()->checkForColumn( 'cms_database_fields', 'field_name' ) )
{
$columns[] = "field_name";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_fields', 'field_description' ) )
{
$columns[] = "field_description";
}
if( \IPS\Db::i()->checkForColumn( 'cms_database_fields', 'field_is_numeric' ) )
{
$columns[] = "field_is_numeric";
}
if( count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_database_fields', $columns );
}
/* Pages */
$columns = array();
if( \IPS\Db::i()->checkForColumn( 'cms_pages', 'page_template_used' ) )
{
$columns[] = "page_template_used";
}
if( \IPS\Db::i()->checkForColumn( 'cms_pages', 'page_last_edited' ) )
{
$columns[] = "page_last_edited";
}
if( \IPS\Db::i()->checkForColumn( 'cms_pages', 'page_content_only' ) )
{
$columns[] = "page_content_only";
}
if( \IPS\Db::i()->checkForColumn( 'cms_pages', 'page_content_type' ) )
{
$columns[] = "page_content_type";
}
if( \IPS\Db::i()->checkForColumn( 'cms_pages', 'page_omit_filename' ) )
{
$columns[] = "page_omit_filename";
}
if( count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_pages', $columns );
}
/* Blocks */
$columns = array();
if( \IPS\Db::i()->checkForColumn( 'cms_blocks', 'block_name' ) )
{
$columns[] = "block_name";
}
if( \IPS\Db::i()->checkForColumn( 'cms_blocks', 'block_description' ) )
{
$columns[] = "block_description";
}
if( count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_blocks', $columns );
}
/* Databases */
$columns = array();
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_name' ) )
{
$columns[] = "database_name";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_database' ) )
{
$columns[] = "database_database";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_description' ) )
{
$columns[] = "database_description";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_field_count' ) )
{
$columns[] = "database_field_count";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_rss_cache' ) )
{
$columns[] = "database_rss_cache";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_rss_cached' ) )
{
$columns[] = "database_rss_cached";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_lang_sl' ) )
{
$columns[] = "database_lang_sl";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_lang_pl' ) )
{
$columns[] = "database_lang_pl";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_lang_su' ) )
{
$columns[] = "database_lang_su";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_lang_pu' ) )
{
$columns[] = "database_lang_pu";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_featured_article' ) )
{
$columns[] = "database_featured_article";
}
if( \IPS\Db::i()->checkForColumn( 'cms_databases', 'database_is_articles' ) )
{
$columns[] = "database_is_articles";
}
if( count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_databases', $columns );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step3CustomTitle()
{
return "Cleaning up database tables";
}
}
Whitespace-only changes.
@@ -0,0 +1,23 @@
{
"1": {
"method": "changeColumn",
"params": [
"cms_templates",
"template_params",
{
"name": "template_params",
"type": "TEXT",
"length": null,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,45 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_page_widget_areas",
{
"name": "area_orientation",
"type": "ENUM",
"length": 100,
"decimals": null,
"values": [
"horizontal",
"vertical"
],
"allow_null": false,
"default": "horizontal",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "addColumn",
"params": [
"cms_blocks",
{
"name": "block_cache",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": [],
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,41 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @since 15 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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 RC 2 Upgrade Code
*/
class _Upgrade
{
/**
* 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()
{
foreach ( \IPS\Db::i()->select( 'database_id', 'cms_databases', 'database_page_id>0' ) as $id )
{
\IPS\Task::queue( 'core', 'RebuildItems', array( 'class' => 'IPS\cms\Records' . $id ), 3, array( 'class' ) );
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\cms\Records' . $id, 'count' => 0 ), 4, array( 'class' ) );
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\cms\Categories' . $id, 'count' => 0 ), 5, array( 'class' ) );
}
}
}
Whitespace-only changes.
@@ -0,0 +1,137 @@
{
"1": {
"method": "addColumn",
"params": [
"cms_blocks",
{
"name": "block_plugin_plugin",
"type": "INT",
"length": 10,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"2": {
"method": "update",
"params": [
"core_reputation_index",
{
"app": "cms"
},
[
"app = ?",
"ccs"
]
]
},
"3": {
"method": "addIndex",
"params": [
"cms_pages",
{
"type": "key",
"name": "page_default",
"columns": [
"page_default",
"page_folder_id"
],
"length": [
null,
null
]
}
]
},
"4": {
"method": "addIndex",
"params": [
"cms_pages",
{
"type": "key",
"name": "page_full_path",
"columns": [
"page_full_path"
],
"length": [
250
]
}
]
},
"5": {
"method": "addIndex",
"params": [
"cms_folders",
{
"type": "key",
"name": "folder_path",
"columns": [
"folder_path"
],
"length": [
250
]
}
]
},
"6": {
"method": "addIndex",
"params": [
"cms_folders",
{
"type": "key",
"name": "folder_parent_id",
"columns": [
"folder_parent_id"
],
"length": [
null
]
}
]
},
"7": {
"method": "addIndex",
"params": [
"cms_databases",
{
"type": "key",
"name": "forum_lookup",
"columns": [
"database_forum_record",
"database_forum_forum",
"database_forum_comments"
],
"length": [
null,
null,
null
]
}
]
},
"8": {
"method": "addIndex",
"params": [
"cms_containers",
{
"type": "key",
"name": "container_parent_id",
"columns": [
"container_parent_id"
],
"length": [
null
]
}
]
}
}
@@ -0,0 +1,131 @@
<?php
/**
* @brief 4.0.0 Beta 6 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 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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 RC5 Upgrade Code
*
*/
class _Upgrade
{
/**
* Step 1
* Convert menu titles to translatable lang strings
*
* @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( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
{
$save = array();
foreach( \IPS\Lang::languages() as $id => $lang )
{
try
{
$base = $lang->get('__indefart_content_db_lang_sl');
}
catch ( \UnderflowException $e )
{
$base = "a %s"; // If upgrading from 3.x it won't exist yet
}
try
{
$string = $lang->get("content_db_lang_sl_" . $db['database_id']);
}
catch ( \UnderflowException $e )
{
$string = "record"; // If upgrading from 3.x it won't exist yet
}
$save[ $lang->_id ] = \sprintf( $base, $string );
}
\IPS\Lang::saveCustom( 'cms', "content_db_lang_ia_" . $db['database_id'], $save );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Storing indefinite article translations";
}
/**
* Step 2
* Move any orphaned blocks to a new category
*
* @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()
{
if( !\IPS\Db::i()->select( 'COUNT(*)', 'cms_blocks', array( 'block_category=?', 0 ) ) )
{
/* If there aren't any, don't create a new block category */
return TRUE;
}
$container = new \IPS\cms\Blocks\Container;
$container->name = 'Uncategorized Blocks';
$container->type = 'block';
$container->order = 0;
$container->parent_id = 0;
$container->key = md5( uniqid() );
$container->save();
\IPS\Db::i()->update( 'cms_blocks', array( 'block_category' => $container->_id ), array( 'block_category=?', 0 ) );
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Restoring orphaned Pages blocks";
}
/**
* 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()
{
foreach ( \IPS\Db::i()->select( 'database_id', 'cms_databases', 'database_page_id>0' ) as $id )
{
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\cms\Records' . $id ), 4 );
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\cms\Records\Comment' . $id ), 4 );
\IPS\Task::queue( 'core', 'RebuildReputationIndex', array( 'class' => 'IPS\cms\Records\Review' . $id ), 4 );
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\cms\Categories' . $id, 'count' => 0 ), 5, array( 'class' ) );
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,4 @@
<?php
$SQL[] = "ALTER TABLE ccs_block_wizard ADD wizard_started VARCHAR( 13 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_wizard ADD wizard_started VARCHAR( 13 ) NOT NULL DEFAULT '0';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_10002;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 10002 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,118 @@
{
"1": {
"method": "addIndex",
"params": [
"cms_templates",
{
"type": "key",
"name": "template_location",
"columns": [
"template_location",
"template_user_edited"
],
"length": [
250,
null
]
}
]
},
"2": {
"method": "addIndex",
"params": [
"cms_templates",
{
"type": "key",
"name": "template_key",
"columns": [
"template_key"
],
"length": [
250
]
}
]
},
"3": {
"method": "addIndex",
"params": [
"cms_templates",
{
"type": "key",
"name": "template_type",
"columns": [
"template_type",
"template_user_edited"
],
"length": [
null,
null
]
}
]
},
"4": {
"method": "addIndex",
"params": [
"cms_database_comments",
{
"type": "key",
"name": "comment_approved",
"columns": [
"comment_approved"
],
"length": [
null
]
}
]
},
"5": {
"method": "addIndex",
"params": [
"cms_database_reviews",
{
"type": "key",
"name": "review_approved",
"columns": [
"review_approved"
],
"length": [
null
]
}
]
},
"6": {
"method": "addIndex",
"params": [
"cms_database_reviews",
{
"type": "key",
"name": "review_ip",
"columns": [
"review_ip_address"
],
"length": [
null
]
}
]
},
"7": {
"method": "addIndex",
"params": [
"cms_database_reviews",
{
"type": "key",
"name": "review_author",
"columns": [
"review_author"
],
"length": [
null
]
}
]
}
}
Whitespace-only changes.
@@ -0,0 +1,58 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @since 06 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100023;
/* 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
{
/**
* Step 1
* Create background tasks to rebuild editor 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()
{
foreach( \IPS\Db::i()->select( '*', 'cms_databases') as $database )
{
foreach( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_database_id=? AND field_type=?', $database['database_id'], 'Editor' ) ) as $field )
{
if ( $field['field_id'] != $database['database_field_content'] )
{
\IPS\Task::queue( 'cms', 'RebuildEditorFields', array( 'class' => 'IPS\cms\Records' . $database['database_id'], 'fieldId' => $field['field_id'] ), 5, array( 'class', 'fieldId' ) );
}
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Creating tasks to rebuild editor fields";
}
}
Whitespace-only changes.
@@ -0,0 +1,68 @@
<?php
/**
* @brief 4.0.2 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 15 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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
{
/**
* Step 1
* Create language strings
*
* @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()
{
$strings = array();
foreach( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
{
foreach( \IPS\Lang::languages() as $id => $lang )
{
try
{
$base = $lang->get('digest_area_records' . $db['database_id'] );
}
catch ( \UnderflowException $e )
{
$base = "";
}
$strings[ $lang->_id ] = $base;
}
\IPS\Lang::saveCustom( 'cms', "digest_area_categories" . $db['database_id'], $strings );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Creating missing language strings";
}
}
@@ -0,0 +1,62 @@
<?php
/**
* @brief 4.0.3 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
* @subpackage Pages
* @since 20 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100026;
/* 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.3 Upgrade Code
*/
class _Upgrade
{
/**
* Add record_comments_hidden field
*
* @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( \IPS\Db::i()->select( '*', 'cms_databases' ) as $database )
{
if ( ! \IPS\Db::i()->checkForColumn( 'cms_custom_database_' . $database['database_id'], 'record_comments_hidden' ) )
{
\IPS\Db::i()->addColumn( 'cms_custom_database_' . $database['database_id'], array(
"name" => "record_comments_hidden",
"type" => "INT",
"length" => 10,
"null" => true,
"default" => null,
"comment" => "",
"unsigned" => true
) );
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Correcting custom database definitions";
}
}
@@ -0,0 +1,47 @@
<?php
/**
* @brief 4.0.5 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
* @subpackage Blog
* @since 5 May 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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('cms');
foreach ( \IPS\Db::i()->select( 'database_id', 'cms_databases', 'database_page_id>0' ) as $id )
{
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\cms\Records' . $id ), 3, array( 'class' ) );
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\cms\Records\Comment' . $id ), 3, array( 'class' ) );
\IPS\Task::queue( 'core', 'RebuildContentImages', array( 'class' => 'IPS\cms\Records\Review' . $id ), 3, array( 'class' ) );
}
return TRUE;
}
}
@@ -0,0 +1,56 @@
<?php
/**
* @brief 4.0.5 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
* @subpackage Pages
* @since 20 Apr 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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.5 Upgrade Code
*/
class _Upgrade
{
/**
* Fixes BBCode type pages
*
* @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( \IPS\Db::i()->select( '*', 'cms_pages', array( 'page_type=?', 'bbcode' ) ) as $page )
{
$update = array(
'page_content' => \IPS\Text\LegacyParser::parseStatic( $page['page_content'] ),
'page_type' => 'html'
);
\IPS\Db::i()->update( 'cms_pages', $update, array( 'page_id=?', $page['page_id'] ) );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Converting bbcode pages to HTML pages";
}
}
@@ -0,0 +1,9 @@
{
"1": {
"method": "dropTable",
"params": [
"cms_page_database_map",
true
]
}
}
@@ -0,0 +1,69 @@
<?php
/**
* @brief 4.0.9 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
* @subpackage Pages
* @since 19 Jun 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\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', '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'] == 'LatestArticles' )
{
$widgets[ $k ]['key'] = 'RecordFeed';
if ( isset( $widgets[ $k ]['configuration']['database'] ) )
{
$widgets[ $k ]['configuration']['cms_rf_database'] = $widgets[ $k ]['configuration']['database'];
unset( $widgets[ $k ]['configuration']['database'] );
}
$update = TRUE;
}
if ( $update )
{
\IPS\Db::i()->update( $table, array( $widgetsColumn => json_encode( $widgets ) ), $whereClause );
}
}
}
}
return TRUE;
}
}
@@ -0,0 +1,13 @@
{
"1": {
"method": "delete",
"params": [
"core_widgets",
[
"app=? AND `key`=?",
"cms",
"LatestArticles"
]
]
}
}
@@ -0,0 +1,135 @@
<?php
/**
* @brief 4.0.11 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 14 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100041;
/* 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.11 Upgrade Code
*/
class _Upgrade
{
/**
* Fix Pages blocks that use topicFeed block
*
* @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 ( \IPS\Db::i()->select( '*', 'cms_blocks', array( 'block_type=?', 'plugin' ) ) as $block )
{
$config = json_decode( $block['block_plugin_config'], TRUE );
$update = FALSE;
if ( $block['block_plugin'] == 'latestTopics' )
{
$block['block_plugin'] = 'topicFeed';
$update = TRUE;
}
if ( $block['block_plugin'] == 'featuredTopics' )
{
$block['block_plugin'] = 'topicFeed';
$config['tfb_topic_status'] = array( 'open', 'closed', 'pinned', 'notpinned', 'featured' );
$update = TRUE;
}
if ( $block['block_plugin'] == 'recentImages' )
{
$block['block_plugin'] = 'imageFeed';
if ( isset( $config['number_to_show'] ) )
{
$config['widget_feed_show'] = $config['number_to_show'];
unset($config['number_to_show'] );
}
$update = TRUE;
}
if ( $block['block_plugin'] == 'topImages' )
{
$block['block_plugin'] = 'imageFeed';
$config['widget_feed_min_rating'] = 1;
$config['widget_feed_sort_on'] = 'rating';
$config['widget_feed_sort_dir'] = 'desc';
if ( isset( $config['number_to_show'] ) )
{
$config['widget_feed_show'] = $config['number_to_show'];
unset( $config['number_to_show'] );
}
$update = TRUE;
}
if ( $block['block_plugin'] == 'recentFiles' )
{
$block['block_plugin'] = 'fileFeed';
if ( isset( $config['number_to_show'] ) )
{
$config['widget_feed_show'] = $config['number_to_show'];
unset( $config['number_to_show'] );
}
$update = TRUE;
}
if ( $block['block_plugin'] == 'LatestArticles' )
{
$block['block_plugin'] = 'RecordFeed';
if ( isset( $config['database'] ) )
{
$config['cms_rf_database'] = $config['database'];
unset( $config['database'] );
}
$update = TRUE;
}
if ( $block['block_plugin'] == 'topicFeed' )
{
$update = TRUE;
foreach ( $config as $_k => $_v )
{
$_k = str_replace( 'tfb_', 'widget_feed', $_k );
if ( $_k == 'widget_feed_topic_status' )
{
$_k = 'widget_feed_status';
}
$config[ $_k ] = $_v;
}
}
if ( $update )
{
\IPS\Db::i()->update( 'cms_blocks', array( 'block_plugin' => $block['block_plugin'], 'block_plugin_config' => json_encode( $config ) ), array( 'block_id=?', $block['block_id'] ) );
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Updating custom feed blocks";
}
}
@@ -0,0 +1,22 @@
{
"1": {
"method": "delete",
"params": [
"core_widget_areas",
[
"app=?",
"cms"
]
]
},
"2": {
"method": "delete",
"params": [
"cms_url_store",
[
"store_path=?",
""
]
]
}
}
@@ -0,0 +1,80 @@
<?php
/**
* @brief 4.0.13 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 30 Jul 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_100044;
/* 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.13 Upgrade Code
*/
class _Upgrade
{
/**
* Attachments field may have 0 mapped instead of null or empty string
*
* @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( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_type=?', 'Upload' ) ) as $field )
{
\IPS\Db::i()->update( 'cms_custom_database_' . $field['field_database_id'], array( 'field_' . $field['field_id'] => NULL ), array( 'field_' . $field['field_id'] . '=?', '0' ) );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Adjusting empty attachment fields";
}
/**
* Databases did not previously remove follows
*
* @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()
{
$areas = array();
foreach( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
{
$areas[] = "records" . $db['database_id'];
$areas[] = "categories" . $db['database_id'];
}
\IPS\Db::i()->delete( 'core_follow', array( "follow_app=? AND follow_area NOT IN('" . implode( "','", $areas ) . "')", 'cms' ) );
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Removing invalid follow notifications";
}
}
Whitespace-only changes.
@@ -0,0 +1,5 @@
<?php
$SQL[] = "ALTER TABLE ccs_page_wizard ADD wizard_previous_type VARCHAR( 32 ) NULL;";
$SQL[] = "ALTER TABLE ccs_pages ADD page_ipb_wrapper TINYINT( 1 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_wizard ADD wizard_ipb_wrapper TINYINT( 1 ) NOT NULL DEFAULT '0';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_10005;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 10005 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,3 @@
<?php
$SQL[] = "ALTER TABLE ccs_block_wizard CHANGE wizard_name wizard_name VARCHAR( 255 ) NULL DEFAULT NULL;";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_10007;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 10007 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,91 @@
<?php
$SQL[] = "UPDATE core_applications SET app_title='IP.Content' WHERE app_directory='ccs';";
$SQL[] = "ALTER TABLE ccs_pages ADD INDEX ( page_content_type );";
$SQL[] = "CREATE TABLE ccs_database_fields (
field_id int(11) NOT NULL auto_increment,
field_database_id mediumint(9) NOT NULL,
field_name varchar(255) NOT NULL,
field_description text,
field_key varchar(255) NOT NULL,
field_type varchar(255) default NULL,
field_required tinyint(1) NOT NULL default '0',
field_user_editable tinyint(1) NOT NULL default '0',
field_position int(11) NOT NULL default '0',
field_max_length mediumint(9) NOT NULL default '0',
field_extra text,
PRIMARY KEY (field_id),
KEY field_database_id (field_database_id),
KEY field_key (field_key)
);";
$SQL[] = "CREATE TABLE ccs_databases (
database_id mediumint(9) NOT NULL auto_increment,
database_name varchar(255) NOT NULL,
database_key varchar(255) NOT NULL,
database_database varchar(255) NULL,
database_description text,
database_field_count mediumint(9) NOT NULL default '0',
database_record_count mediumint(9) NOT NULL default '0',
database_template_listing int(11) NOT NULL default '0',
database_template_display mediumint(9) NOT NULL default '0',
database_user_editable tinyint(1) NOT NULL default '0',
database_all_editable tinyint(1) NOT NULL default '0',
database_open tinyint(1) NOT NULL default '0',
database_comments tinyint(1) NOT NULL default '0',
database_rate tinyint(1) NOT NULL default '0',
database_revisions tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (database_id),
UNIQUE KEY database_key (database_key)
);";
$SQL[] = "ALTER TABLE ccs_page_templates ADD template_database tinyint(1) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_templates ADD INDEX ( template_database );";
$SQL[] = "CREATE TABLE ccs_database_revisions (
revision_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
revision_database_id mediumint(9) NOT NULL ,
revision_record_id int(11) NOT NULL ,
revision_data LONGTEXT NULL ,
revision_date varchar(13) NOT NULL DEFAULT '0',
revision_member_id int(11) NOT NULL DEFAULT '0',
INDEX ( revision_database_id , revision_record_id ),
INDEX ( revision_member_id )
);";
$SQL[] = "CREATE TABLE ccs_attachments_map (
map_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
map_attach_id INT NOT NULL DEFAULT '0',
map_database_id MEDIUMINT NOT NULL DEFAULT '0',
map_field_id INT NOT NULL DEFAULT '0',
map_record_id INT NOT NULL DEFAULT '0',
INDEX ( map_database_id ),
INDEX ( map_attach_id )
);";
$SQL[] = "CREATE TABLE ccs_database_ratings (
rating_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
rating_user_id INT NOT NULL DEFAULT '0',
rating_database_id MEDIUMINT NOT NULL DEFAULT '0',
rating_record_id INT NOT NULL DEFAULT '0',
rating_rating INT NOT NULL DEFAULT '0',
rating_added VARCHAR( 13 ) NOT NULL DEFAULT '0',
rating_ip_address VARCHAR( 16 ) NOT NULL DEFAULT '0',
INDEX ( rating_user_id , rating_database_id , rating_record_id )
);";
$SQL[] = "CREATE TABLE ccs_database_comments (
comment_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
comment_user INT NOT NULL DEFAULT '0',
comment_database_id MEDIUMINT NOT NULL DEFAULT '0',
comment_record_id INT NOT NULL DEFAULT '0',
comment_date VARCHAR( 13 ) NOT NULL DEFAULT '0',
comment_ip_address VARCHAR( 16 ) NOT NULL DEFAULT '0',
comment_post TEXT NULL DEFAULT NULL ,
INDEX ( comment_user )
);";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11000;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11000 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,30 @@
<?php
$SQL[] = "CREATE TABLE ccs_database_categories (
category_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
category_database_id MEDIUMINT NOT NULL DEFAULT '0',
category_name VARCHAR( 255 ) NULL DEFAULT NULL ,
category_parent_id INT NOT NULL DEFAULT '0',
category_last_record_id INT NOT NULL DEFAULT '0',
category_last_record_date VARCHAR( 13 ) NOT NULL DEFAULT '0',
category_last_record_member INT NOT NULL DEFAULT '0',
category_last_record_name VARCHAR( 255 ) NULL DEFAULT NULL,
category_last_record_seo_name VARCHAR( 255 ) NULL DEFAULT NULL,
category_description TEXT NULL DEFAULT NULL,
category_position INT NOT NULL DEFAULT '0',
category_records INT NOT NULL DEFAULT '0',
INDEX ( category_database_id )
);";
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_html TINYINT NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_databases ADD database_template_categories MEDIUMINT NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_databases CHANGE database_template_listing database_template_listing MEDIUMINT NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_databases ADD database_field_title VARCHAR( 255 ) NULL DEFAULT NULL,
ADD database_field_sort VARCHAR( 255 ) NULL DEFAULT NULL,
ADD database_field_direction VARCHAR( 4 ) NOT NULL DEFAULT 'desc',
ADD database_field_perpage SMALLINT NOT NULL DEFAULT '25';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11001;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11001 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,18 @@
<?php
$SQL[] = "CREATE TABLE ccs_database_moderators (
moderator_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
moderator_database_id INT NOT NULL DEFAULT '0',
moderator_type VARCHAR( 16 ) NULL DEFAULT NULL ,
moderator_type_id INT NOT NULL DEFAULT '0',
moderator_delete_record TINYINT(1) NOT NULL DEFAULT '0',
moderator_edit_record TINYINT(1) NOT NULL DEFAULT '0',
moderator_lock_record TINYINT(1) NOT NULL DEFAULT '0',
moderator_unlock_record TINYINT(1) NOT NULL DEFAULT '0',
moderator_delete_comment TINYINT(1) NOT NULL DEFAULT '0',
INDEX ( moderator_database_id )
);";
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_show_records TINYINT(1) NOT NULL DEFAULT '1';";
@@ -0,0 +1,71 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11002;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11002 );
return TRUE;
}
/**
* 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 step2()
{
foreach( \IPS\Db::i()->select( '*', 'ccs_databases' ) as $r )
{
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_locked",
"type" => "TINYINT",
"length" => 1,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_comments",
"type" => "MEDIUMINT",
"length" => 8,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,15 @@
<?php
$SQL[] = "ALTER TABLE ccs_databases ADD database_record_approve TINYINT(1) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_has_perms TINYINT(1) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_comments ADD comment_approved TINYINT(1) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_databases ADD database_comment_approve TINYINT(1) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_moderators ADD moderator_approve_record TINYINT(1) NOT NULL DEFAULT '0',
ADD moderator_approve_comment TINYINT(1) NOT NULL DEFAULT '0',
ADD moderator_pin_record TINYINT(1) NOT NULL DEFAULT '0';";
@@ -0,0 +1,93 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11003;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11003 );
return TRUE;
}
/**
* 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 step2()
{
foreach( \IPS\Db::i()->select( '*', 'ccs_databases' ) as $r )
{
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_approved",
"type" => "TINYINT",
"length" => 1,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_pinned",
"type" => "TINYINT",
"length" => 1,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_views",
"type" => "MEDIUMINT",
"length" => 8,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addIndex( $r['database_database'], array(
'type' => 'key',
'name' => 'record_approved',
'columns' => array( 'record_approved' )
) );
\IPS\Db::i()->addIndex( $r['database_database'], array(
'type' => 'key',
'name' => 'category_id',
'columns' => array( 'category_id' )
) );
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,5 @@
<?php
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_is_numeric TINYINT(1) NOT NULL DEFAULT '0';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11005;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11005 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,7 @@
<?php
$SQL[] = "ALTER TABLE ccs_database_comments ADD INDEX ( comment_database_id , comment_record_id , comment_date );";
$SQL[] = "ALTER TABLE ccs_attachments_map DROP INDEX map_database_id , ADD INDEX map_database_id ( map_database_id , map_record_id );";
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_truncate MEDIUMINT NOT NULL DEFAULT '100';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_11008;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 11008 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,8 @@
<?php
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_default_value TEXT NULL DEFAULT NULL,
ADD field_display_listing TINYINT( 1 ) NOT NULL DEFAULT '1',
ADD field_display_display TINYINT( 1 ) NOT NULL DEFAULT '1',
ADD field_format_opts TEXT NULL DEFAULT NULL;";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_12002;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 12002 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,69 @@
<?php
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_validator TEXT NULL DEFAULT NULL, ADD field_topic_format TEXT NULL DEFAULT NULL;";
$SQL[] = "ALTER TABLE ccs_databases ADD database_rss VARCHAR( 255 ) NOT NULL DEFAULT '0',
ADD database_rss_cache MEDIUMTEXT NULL DEFAULT NULL ,
ADD database_field_content VARCHAR( 255 ) NULL DEFAULT NULL,
ADD database_lang_sl VARCHAR( 255 ) NOT NULL DEFAULT '',
ADD database_lang_pl VARCHAR( 255 ) NOT NULL DEFAULT '',
ADD database_lang_su VARCHAR( 255 ) NOT NULL DEFAULT '',
ADD database_lang_pu VARCHAR( 255 ) NOT NULL DEFAULT '',
ADD database_comment_bump TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD database_featured_article INT NOT NULL DEFAULT '0',
ADD database_is_articles TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD database_meta_keywords TEXT NULL DEFAULT NULL,
ADD database_meta_description TEXT NULL DEFAULT NULL,
ADD database_forum_record TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD database_forum_comments TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD database_forum_delete TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD database_forum_forum MEDIUMINT NOT NULL DEFAULT '0',
ADD database_forum_prefix VARCHAR( 255 ) NULL DEFAULT NULL,
ADD database_forum_suffix VARCHAR( 255 ) NULL DEFAULT NULL,
ADD INDEX ( database_is_articles );";
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_rss VARCHAR( 255 ) NULL DEFAULT '0',
ADD category_rss_cache MEDIUMTEXT NULL DEFAULT NULL,
ADD category_furl_name VARCHAR( 255 ) NULL DEFAULT NULL,
ADD category_meta_keywords TEXT NULL DEFAULT NULL,
ADD category_meta_description TEXT NULL DEFAULT NULL,
ADD category_template INT NOT NULL DEFAULT '0',
ADD category_forum_override TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD category_forum_record TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD category_forum_comments TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD category_forum_delete TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD category_forum_forum MEDIUMINT NOT NULL DEFAULT '0',
ADD category_forum_prefix VARCHAR( 255 ) NULL DEFAULT NULL,
ADD category_forum_suffix VARCHAR( 255 ) NULL DEFAULT NULL,
ADD INDEX ( category_template );";
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_records_queued INT NOT NULL DEFAULT '0' AFTER category_records;";
$SQL[] = "CREATE TABLE ccs_database_notifications (
notify_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
notify_member INT NOT NULL default '0',
notify_database INT NOT NULL default '0',
notify_record INT NOT NULL default '0',
notify_category INT NOT NULL default '0',
notify_start INT NOT NULL default '0',
notify_last_sent INT NOT NULL default '0',
KEY notify_member (notify_member),
KEY notify_category (notify_category,notify_database),
KEY notify_record (notify_record,notify_database)
);";
$SQL[] = "CREATE TABLE ccs_database_modqueue (
mod_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
mod_database INT NOT NULL default '0',
mod_record INT NOT NULL default '0',
mod_comment INT NOT NULL default '0',
mod_poster INT NOT NULL default '0',
KEY mod_database (mod_database,mod_record,mod_comment)
);";
$SQL[] = "ALTER TABLE ccs_database_moderators ADD moderator_add_record TINYINT(1) NOT NULL DEFAULT '0';";
$SQL[] = "DELETE FROM ccs_template_cache WHERE cache_type='block';";
$SQL[] = "ALTER TABLE ccs_template_cache DROP index cache_type;";
$SQL[] = "ALTER TABLE ccs_template_cache ADD UNIQUE INDEX cache_type (cache_type,cache_type_id);";
@@ -0,0 +1,124 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
* @note Do we need to import articles db?
*/
namespace IPS\cms\setup\upg_20000;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 20000 );
return TRUE;
}
/**
* 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 step2()
{
foreach( \IPS\Db::i()->select( '*', 'ccs_databases' ) as $r )
{
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_template",
"type" => "INT",
"length" => 10,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_topicid",
"type" => "INT",
"length" => 10,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_meta_keywords",
"type" => "TEXT",
"length" => null,
"null" => true,
"default" => null,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_meta_description",
"type" => "TEXT",
"length" => null,
"null" => true,
"default" => null,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_dynamic_furl",
"type" => "VARCHAR",
"length" => 255,
"null" => true,
"default" => null,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addColumn( $r['database_database'], array(
"name" => "record_static_furl",
"type" => "VARCHAR",
"length" => 255,
"null" => true,
"default" => null,
"comment" => "",
"unsigned" => false
) );
\IPS\Db::i()->addIndex( $r['database_database'], array(
'type' => 'key',
'name' => 'record_static_furl',
'columns' => array( 'record_static_furl' )
) );
\IPS\Db::i()->addIndex( $r['database_database'], array(
'type' => 'key',
'name' => 'record_topicid',
'columns' => array( 'record_topicid' )
) );
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,3 @@
<?php
$SQL[] = "update ccs_pages SET page_view_perms=CONCAT(',',page_view_perms,',') WHERE page_view_perms != '*';";
@@ -0,0 +1,39 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
* @note Do we need to import articles db?
*/
namespace IPS\cms\setup\upg_20005;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 20005 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,37 @@
<?php
if( !\IPS\Db::i()->checkForColumn( 'ccs_database_fields', 'field_topic_format' ) )
{
$SQL[] = "ALTER TABLE ccs_database_fields ADD field_topic_format TEXT NULL DEFAULT NULL;";
}
$SQL[] = "ALTER TABLE ccs_databases ADD database_search TINYINT( 1 ) NOT NULL DEFAULT '0';";
$SQL[] = "UPDATE ccs_databases SET database_search=1;";
$SQL[] = "ALTER TABLE ccs_template_blocks CHANGE tpb_content tpb_content MEDIUMTEXT NULL DEFAULT NULL;";
$SQL[] = "CREATE TABLE ccs_revisions (
revision_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
revision_type VARCHAR( 32 ) NOT NULL ,
revision_type_id INT NOT NULL ,
revision_content MEDIUMTEXT NULL DEFAULT NULL ,
revision_other MEDIUMTEXT NULL ,
revision_date INT NOT NULL DEFAULT '0',
revision_member INT NOT NULL DEFAULT '0',
INDEX ( revision_type , revision_type_id, revision_date ),
INDEX ( revision_member )
);";
$SQL[] = "ALTER TABLE ccs_page_wizard ADD wizard_omit_filename TINYINT( 1 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_pages ADD page_omit_filename TINYINT( 1 ) NOT NULL DEFAULT '0';";
if( !\IPS\Db::i()->checkForColumn( 'ccs_database_categories', 'category_records_queued' ) )
{
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_records_queued INT NOT NULL DEFAULT '0' AFTER category_records;";
}
$SQL[] = "ALTER TABLE ccs_template_blocks ADD INDEX tpb_name(tpb_name);";
$SQL[] = "ALTER TABLE ccs_containers ADD INDEX container_type( container_type, container_order );";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_21000;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 21000 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,34 @@
<?php
/*
+--------------------------------------------------------------------------
| IP.Board vVERSION_NUMBER
| ========================================
| by Matthew Mecham
| (c) 2001 - 2009 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
*/
/* IP.Content upgrade */
$SQL[] = "ALTER TABLE ccs_database_comments CHANGE comment_ip_address comment_ip_address VARCHAR( 46 ) NOT NULL DEFAULT '0',
CHANGE comment_date comment_date INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_ratings CHANGE rating_ip_address rating_ip_address VARCHAR( 46 ) NOT NULL DEFAULT '0',
CHANGE rating_added rating_added INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_block_wizard CHANGE wizard_started wizard_started INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "UPDATE ccs_database_categories SET category_last_record_date=0 WHERE category_last_record_date='';";
$SQL[] = "ALTER TABLE ccs_database_categories CHANGE category_last_record_date category_last_record_date INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_revisions CHANGE revision_date revision_date INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_folders CHANGE last_modified last_modified INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_pages CHANGE page_last_edited page_last_edited INT( 10 ) NOT NULL DEFAULT '0',
CHANGE page_cache_last page_cache_last INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_templates CHANGE template_updated template_updated INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_wizard CHANGE wizard_started wizard_started INT( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "UPDATE core_permission_index SET perm_type='categories' WHERE app='ccs' AND perm_type='cat';";
$SQL[] = "UPDATE core_permission_index SET perm_type='databases' WHERE app='ccs' AND perm_type='database';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_22000;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 22000 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,19 @@
<?php
/*
+--------------------------------------------------------------------------
| IP.Board vVERSION_NUMBER
| ========================================
| by Matthew Mecham
| (c) 2001 - 2009 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
*/
/* IP.Content upgrade */
$SQL[] = "ALTER TABLE ccs_pages CHANGE page_cache_ttl page_cache_ttl VARCHAR( 10 ) NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_page_wizard CHANGE wizard_cache_ttl wizard_cache_ttl VARCHAR( 10 ) NOT NULL DEFAULT '0';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_22003;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 22003 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,18 @@
<?php
/*
+--------------------------------------------------------------------------
| IP.Board vVERSION_NUMBER
| ========================================
| by Matthew Mecham
| (c) 2001 - 2009 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
*/
/* IP.Content upgrade */
$SQL[] = "ALTER TABLE ccs_blocks CHANGE block_cache_ttl block_cache_ttl VARCHAR(10) NOT NULL DEFAULT '0';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_22004;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 22004 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,92 @@
<?php
/*
+--------------------------------------------------------------------------
| IP.Board vVERSION_NUMBER
| ========================================
| by Matthew Mecham
| (c) 2001 - 2009 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
*/
/* IP.Content upgrade */
$SQL[] = "ALTER TABLE ccs_pages DROP page_description,
ADD page_title VARCHAR( 255 ) NULL DEFAULT NULL,
DROP INDEX page_seo_name,
ADD INDEX page_seo_name ( page_seo_name (100), page_folder (100) ),
ADD page_quicknav TINYINT NOT NULL DEFAULT '1';";
$SQL[] = "ALTER TABLE ccs_page_wizard DROP wizard_description,
ADD INDEX ( wizard_started ),
ADD wizard_page_title VARCHAR( 255 ) NULL DEFAULT NULL,
ADD wizard_page_quicknav TINYINT NOT NULL DEFAULT '1';";
$SQL[] = "ALTER TABLE ccs_block_wizard ADD INDEX ( wizard_started );";
$SQL[] = "ALTER TABLE ccs_databases DROP database_meta_keywords,
DROP database_meta_description,
ADD database_rss_cached INT NOT NULL DEFAULT '0' AFTER database_rss_cache,
ADD database_tags_enabled TINYINT NOT NULL DEFAULT '0',
ADD database_tags_noprefixes TINYINT NOT NULL DEFAULT '0',
ADD database_tags_predefined TEXT NULL DEFAULT NULL;";
$SQL[] = "ALTER TABLE ccs_database_categories ADD category_rss_cached INT NOT NULL DEFAULT '0' AFTER category_rss_cache,
ADD category_rss_exclude TINYINT NOT NULL DEFAULT '0' AFTER category_rss_cached,
ADD category_page_title VARCHAR( 255 ) NULL DEFAULT NULL,
ADD category_record_comments INT NOT NULL DEFAULT '0' AFTER category_records_queued,
ADD category_record_comments_queued INT NOT NULL DEFAULT '0' AFTER category_record_comments,
ADD category_tags_override TINYINT NOT NULL DEFAULT '0',
ADD category_tags_enabled TINYINT NOT NULL DEFAULT '0',
ADD category_tags_noprefixes TINYINT NOT NULL DEFAULT '0',
ADD category_tags_predefined TEXT NULL DEFAULT NULL;";
$SQL[] = "ALTER TABLE ccs_database_moderators ADD moderator_edit_comment TINYINT NOT NULL DEFAULT '0',
ADD moderator_restore_revision TINYINT NOT NULL DEFAULT '0',
ADD moderator_extras TINYINT NOT NULL DEFAULT '0';";
$SQL[] = "ALTER TABLE ccs_database_comments ADD comment_author VARCHAR( 255 ) NULL DEFAULT NULL,
ADD comment_edit_date INT NOT NULL DEFAULT '0';";
$SQL[] = "UPDATE core_sys_conf_settings SET conf_value='' WHERE conf_key='ccs_template_type' AND conf_value='codepress';";
$SQL[] = "DELETE FROM ccs_template_blocks WHERE tpb_name='block__watched_content';";
$SQL[] = "ALTER TABLE ccs_template_blocks ADD tpb_human_name VARCHAR(255) NULL DEFAULT NULL,
ADD tpb_app_type VARCHAR(30) NULL DEFAULT NULL,
ADD tpb_content_type VARCHAR(30) NULL DEFAULT NULL,
ADD tpb_image VARCHAR(255) NULL DEFAULT NULL,
ADD tpb_position int NOT NULL DEFAULT 0,
ADD tpb_protected TINYINT NOT NULL DEFAULT 0,
ADD tpb_desc TEXT NULL DEFAULT NULL;";
$SQL[] = "CREATE TABLE ccs_slug_memory (
memory_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
memory_url VARCHAR( 255 ) NULL DEFAULT NULL ,
memory_type VARCHAR( 32 ) NULL DEFAULT NULL ,
memory_type_id INT NOT NULL DEFAULT '0',
memory_type_id_2 INT NOT NULL DEFAULT '0',
KEY ( memory_url )
);";
$SQL[] = "DROP TABLE ccs_database_notifications;";
$SQL[] = "CREATE TABLE ccs_menus (
menu_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
menu_parent_id INT NOT NULL DEFAULT '0',
menu_title VARCHAR( 255 ) NULL DEFAULT NULL ,
menu_url TEXT NULL DEFAULT NULL ,
menu_submenu INT NOT NULL DEFAULT '0',
menu_position VARCHAR( 255 ) NOT NULL DEFAULT '0',
menu_description TEXT NULL DEFAULT NULL ,
menu_attributes TEXT NULL DEFAULT NULL ,
menu_permissions TEXT NULL DEFAULT NULL ,
INDEX ( menu_parent_id, menu_position(150) ),
INDEX ( menu_position(150) )
);";
$SQL[] = "ALTER TABLE ccs_blocks ADD block_template int NOT NULL DEFAULT 0 AFTER block_key, ADD INDEX ( block_template );";
@@ -0,0 +1,124 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_23002;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 23002 );
return TRUE;
}
/**
* 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 step2()
{
foreach( \IPS\Db::i()->select( '*', 'ccs_blocks', array( 'block_type=?', 'plugin' ) ) as $r )
{
$_config = unserialize( $r['block_config'] );
if( $_config['plugin'] == 'watched_content' )
{
\IPS\Db::i()->delete( 'ccs_blocks', "block_id=" . $r['block_id'] );
}
}
return TRUE;
}
/**
* 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 step3()
{
foreach( \IPS\Db::i()->select( '*', 'ccs_databases' ) as $database )
{
$_permissionIndex = array();
if( !$database['database_open'] )
{
$_permissionIndex['perm_view'] = '';
}
if( !$database['database_comments'] )
{
$_permissionIndex['perm_5'] = '';
}
if( !$database['database_rate'] )
{
$_permissionIndex['perm_6'] = '';
}
if( !$database['database_user_editable'] )
{
$_permissionIndex['perm_3'] = '';
$_permissionIndex['perm_4'] = '';
}
if( count($_permissionIndex) )
{
\IPS\Db::i()->update( 'core_permission_index', $_permissionIndex, "app='ccs' AND perm_type='databases' AND perm_type_id={$database['database_id']}" );
}
if( $database['database_rss'] )
{
$_values = explode( ';', $database['database_rss'] );
\IPS\Db::i()->update( 'ccs_databases', array( 'database_rss' => $_values[0] ? intval($_values[2]) : 0 ), 'database_id=' . $database['database_id'] );
}
\IPS\Db::i()->addColumn( $database['database_database'], array(
"name" => "record_comments_queued",
"type" => "INT",
"length" => 10,
"null" => false,
"default" => 0,
"comment" => "",
"unsigned" => false
) );
}
foreach( \IPS\Db::i()->select( '*', 'ccs_database_categories' ) as $cat )
{
if( $cat['category_rss'] )
{
$_values = explode( ';', $cat['category_rss'] );
\IPS\Db::i()->update( 'ccs_database_categories', array( 'category_rss' => $_values[0] ? intval($_values[2]) : 0, 'category_rss_exclude' => ( intval($_values[3]) > 0 ) ? 1 : 0 ), 'category_id=' . $cat['category_id'] );
}
}
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,19 @@
<?php
/*
+--------------------------------------------------------------------------
| IP.Board vVERSION_NUMBER
| ========================================
| by Matthew Mecham
| (c) 2001 - 2009 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
*/
/* IP.Content upgrade */
$SQL[] = "UPDATE ccs_database_fields SET field_is_numeric = '1' WHERE field_key='article_date';";
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_23008;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 23008 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,5 @@
<?php
$SQL[] = "ALTER TABLE ccs_database_fields ADD COLUMN field_filter TINYINT(1) NOT NULL DEFAULT 0;";
//
@@ -0,0 +1,38 @@
<?php
/**
* @brief 4.0.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/
* @package IPS Social Suite
* @subpackage Pages
* @since 08 Jan 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\cms\setup\upg_23009;
/* 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
{
/**
* 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()
{
\IPS\core\Setup\Upgrade::runLegacySql( 'cms', 23009 );
return TRUE;
}
}
Whitespace-only changes.
@@ -0,0 +1,38 @@
<?php
/**
* @brief Upgrader: Custom Upgrade Options
* @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 3 Mar 2015
* @version SVN_VERSION_NUMBER
*/
$options = array();
foreach( \IPS\Db::i()->select( '*', 'ccs_databases' ) as $database )
{
$pages = array();
foreach( \IPS\Db::i()->select( '*', 'ccs_pages' ) as $page )
{
if( $database['database_is_articles'] AND mb_strpos( $page['page_content'], "{parse articles" ) !== FALSE )
{
$pages[ $page['page_id'] ] = $page['page_name'] . ' (' . $page['page_seo_name'] . ')';
}
if( mb_strpos( $page['page_content'], "{parse database=\"{$database['database_id']}\"" ) !== FALSE OR mb_strpos( $page['page_content'], "{parse database=\"{$database['database_key']}\"" ) !== FALSE )
{
$pages[ $page['page_id'] ] = $page['page_name'] . ' (' . $page['page_seo_name'] . ')';
}
}
if( count( $pages ) > 1 )
{
\IPS\Member::loggedIn()->language()->words[ '40000_database_page_' . $database['database_id'] ] = sprintf( \IPS\Member::loggedIn()->language()->get( 'cms_database_title' ), $database['database_name'] );
\IPS\Member::loggedIn()->language()->words[ '40000_database_page_' . $database['database_id'] . '_desc' ] = \IPS\Member::loggedIn()->language()->get( 'cms_database_desc' );
$options[] = new \IPS\Helpers\Form\Radio( '40000_database_page_' . $database['database_id'], 0, TRUE, array( 'options' => $pages ) );
}
}
File diff suppressed because it is too large. Load diff
Loaded 100 of 7517 files, more files were not shown because too many files have changed in this diff. Show more