Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100003;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100008;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100010;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -78,7 +78,7 @@ class _Upgrade
{
$updates = array();
if( !is_numeric( $db['database_field_title'] ) or !is_numeric( $db['database_field_content'] ) )
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();
@@ -93,12 +93,12 @@ class _Upgrade
}
/* 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 ) )
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 )
if( \count( $fields ) > 1 )
{
unset( $fields[0] );
}
@@ -113,14 +113,14 @@ class _Upgrade
}
/* 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 ) )
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 ) )
if( \count( $updates ) )
{
\IPS\Db::i()->update( 'cms_databases', $updates, array( 'database_id=?', $db['database_id'] ) );
}
@@ -11,7 +11,7 @@
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"comment": "Path part of the URL",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100011;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -200,7 +200,7 @@ class _Upgrade
$columns[] = "category_tags_predefined";
}
if( count( $columns ) )
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_database_categories', $columns );
}
@@ -223,7 +223,7 @@ class _Upgrade
$columns[] = "field_is_numeric";
}
if( count( $columns ) )
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_database_fields', $columns );
}
@@ -256,7 +256,7 @@ class _Upgrade
$columns[] = "page_omit_filename";
}
if( count( $columns ) )
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_pages', $columns );
}
@@ -274,7 +274,7 @@ class _Upgrade
$columns[] = "block_description";
}
if( count( $columns ) )
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_blocks', $columns );
}
@@ -342,7 +342,7 @@ class _Upgrade
$columns[] = "database_is_articles";
}
if( count( $columns ) )
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'cms_databases', $columns );
}
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100015;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100018;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100023;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100025;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100026;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100028;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100030;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100035;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100041;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -35,7 +35,7 @@ class _Upgrade
$config = json_decode( $block['block_plugin_config'], TRUE );
/* Some badly stored blocks may have corrupt config...we'll just switch to an array to prevent errors in the upgrade */
if( !is_array( $config ) )
if( !\is_array( $config ) )
{
$config = array();
}
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_100044;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
+30 -30
View File
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101000;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -33,7 +33,7 @@ class _Upgrade
foreach ( \IPS\Db::i()->select( '*', 'cms_blocks', array( 'block_type=?', 'plugin' ) ) as $block )
{
$config = json_decode( $block['block_plugin_config'], TRUE );
$config = ( is_array( $config ) ) ? $config : array();
$config = ( \is_array( $config ) ) ? $config : array();
$update = FALSE;
if ( $block['block_plugin'] == 'topicFeed' )
@@ -44,41 +44,41 @@ class _Upgrade
{
if ( $_k === 'widget_feed_status' )
{
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'any';
}
else if ( in_array( 'open', $_v ) )
else if ( \in_array( 'open', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'open';
}
else if ( in_array( 'closed', $_v ) )
else if ( \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'closed';
}
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'any';
}
else if ( in_array( 'pinned', $_v ) )
else if ( \in_array( 'pinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'open';
}
else if ( in_array( 'notpinned', $_v ) )
else if ( \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'closed';
}
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'any';
}
else if ( in_array( 'featured', $_v ) )
else if ( \in_array( 'featured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'featured';
}
else if ( in_array( 'notfeatured', $_v ) )
else if ( \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'notfeatured';
}
@@ -96,7 +96,7 @@ class _Upgrade
$newConfig = array();
foreach ( $config as $_k => $_v )
{
if ( in_array( $_k, array( 'tfb_show', 'tfb_sort_dir', 'tfb_use_perms', 'tfb_topic_status' ) ) )
if ( \in_array( $_k, array( 'tfb_show', 'tfb_sort_dir', 'tfb_use_perms', 'tfb_topic_status' ) ) )
{
$_k = str_replace( 'tfb_', 'widget_feed', $_k );
}
@@ -107,41 +107,41 @@ class _Upgrade
if ( $_k == 'widget_feed_topic_status' )
{
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_item_status_locked'] = 'any';
}
else if ( in_array( 'open', $_v ) )
else if ( \in_array( 'open', $_v ) )
{
$newConfig['widget_feed_item_status_locked'] = 'open';
}
else if ( in_array( 'closed', $_v ) )
else if ( \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_item_status_locked'] = 'closed';
}
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'any';
}
else if ( in_array( 'pinned', $_v ) )
else if ( \in_array( 'pinned', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'open';
}
else if ( in_array( 'notpinned', $_v ) )
else if ( \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'closed';
}
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'any';
}
else if ( in_array( 'featured', $_v ) )
else if ( \in_array( 'featured', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'featured';
}
else if ( in_array( 'notfeatured', $_v ) )
else if ( \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_item_status_pinned'] = 'notfeatured';
}
@@ -176,41 +176,41 @@ class _Upgrade
if ( $_k === 'widget_feed_status' AND $_v !== NULL )
{
if ( in_array( 'open', $_v ) and in_array( 'closed', $_v ) )
if ( \in_array( 'open', $_v ) and \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'any';
}
else if ( in_array( 'open', $_v ) )
else if ( \in_array( 'open', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'open';
}
else if ( in_array( 'closed', $_v ) )
else if ( \in_array( 'closed', $_v ) )
{
$newConfig['widget_feed_status_locked'] = 'closed';
}
if ( in_array( 'pinned', $_v ) and in_array( 'notpinned', $_v ) )
if ( \in_array( 'pinned', $_v ) and \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'any';
}
else if ( in_array( 'pinned', $_v ) )
else if ( \in_array( 'pinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'open';
}
else if ( in_array( 'notpinned', $_v ) )
else if ( \in_array( 'notpinned', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'closed';
}
if ( in_array( 'featured', $_v ) and in_array( 'notfeatured', $_v ) )
if ( \in_array( 'featured', $_v ) and \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'any';
}
else if ( in_array( 'featured', $_v ) )
else if ( \in_array( 'featured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'featured';
}
else if ( in_array( 'notfeatured', $_v ) )
else if ( \in_array( 'notfeatured', $_v ) )
{
$newConfig['widget_feed_status_pinned'] = 'notfeatured';
}
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101021;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101026;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -117,7 +117,7 @@ class _Upgrade
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'cms', 'extra' => array( '_upgradeStep' => 5 ) ) );
@@ -135,6 +135,6 @@ class _Upgrade
*/
public function step4CustomTitle()
{
return "Changing Custom Fields Schema";
return "Changing custom fields database structure";
}
}
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101034;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101056;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101064;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101071;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -48,11 +48,11 @@ class _Upgrade
}
}
if( count( $queries ) )
if( \count( $queries ) )
{
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'cms', 'extra' => array( '_upgradeStep' => 2 ) ) );
@@ -89,7 +89,7 @@ class _Upgrade
$widgets = json_decode( $area['area_widgets'], TRUE );
foreach ( $widgets as $widgetKey => $widget )
{
if( isset( $widget['app'] ) AND !in_array( $widget['app'], $applications ) )
if( isset( $widget['app'] ) AND !\in_array( $widget['app'], $applications ) )
{
unset( $widgets[ $widgetKey ] );
$update = TRUE;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101079;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101088;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -39,7 +39,7 @@ class _Upgrade
$widgets = json_decode( $area['area_widgets'], TRUE );
foreach ( $widgets as $widgetKey => $widget )
{
if( isset( $widget['plugin'] ) AND !in_array( $widget['plugin'], $plugins ) )
if( isset( $widget['plugin'] ) AND !\in_array( $widget['plugin'], $plugins ) )
{
unset( $widgets[ $widgetKey ] );
$update = TRUE;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101090;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101100;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_101105;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Whitespace-only changes.
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_102030;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -59,7 +59,7 @@ class _Upgrade
}
}
if( count( $classes ) )
if( \count( $classes ) )
{
/* Delete Promoted Content from all not existing content classes */
\IPS\Db::i()->delete( 'core_social_promote', \IPS\Db::i()->in( 'promote_class', $classes, TRUE ) );
@@ -100,6 +100,6 @@ class _Upgrade
*/
public function step2CustomTitle()
{
return "Cleaning up Database Records";
return "Cleaning up database records";
}
}
Whitespace-only changes.
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_103000;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -50,11 +50,11 @@ class _Upgrade
}
}
if( count( $queries ) )
if( \count( $queries ) )
{
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'cms', 'extra' => array( '_upgradeStep' => 2 ) ) );
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_103004;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -0,0 +1,16 @@
{
"1": {
"method": "update",
"params": [
"cms_templates",
"template_content=REPLACE(template_content, '\\\\IPS\\\\HTMLENTITIES', 'ENT_DISALLOWED' )"
]
},
"2": {
"method": "update",
"params": [
"cms_templates",
"template_content=REPLACE( template_content, '$record->followers()->count( TRUE )', '$record->followersCount()' )"
]
}
}
@@ -0,0 +1,55 @@
<?php
/**
* @brief 4.4.0 Beta 1 Upgrade Code
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Pages
* @since 25 Jun 2018
*/
namespace IPS\cms\setup\upg_104000;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.4.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Fix Category Permissions
*
* @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()
{
/* @note We wouldn't normally use an upgrade.php for an update query, however this query is semi-complex due to the sub-select, so it confuses the dev center. */
\IPS\Db::i()->delete( 'core_permission_index', array( 'app=? AND perm_type=? AND '. \IPS\Db::i()->in( 'perm_type_id', array_values( iterator_to_array( \IPS\Db::i()->select( 'category_id', 'cms_database_categories' ) ) ), TRUE ), 'cms', 'categories' ) ); # Fix orphans
\IPS\Db::i()->update( 'core_permission_index', 'perm_type=CONCAT( perm_type, \'_\', (' . (string) \IPS\Db::i()->select( 'category_database_id', 'cms_database_categories', array( "category_id=perm_type_id" ) ) . ') )', array( "app=? AND perm_type=?", 'cms', 'categories' ) );
foreach( \IPS\Db::i()->select( '*', 'cms_database_categories' ) AS $cat )
{
\IPS\Db::i()->update( 'core_tags', array( 'tag_aap_lookup' => md5( "cms;categories_{$cat['category_database_id']};{$cat['category_id']}" ) ), array( "tag_aap_lookup=?", md5( "cms;categories;{$cat['category_id']}" ) ) );
\IPS\Db::i()->update( 'core_tags_perms', array( 'tag_perm_aap_lookup' => md5( "cms;categories_{$cat['category_database_id']};{$cat['category_id']}" ) ), array( "tag_perm_aap_lookup=?", md5( "cms;categories;{$cat['category_id']}" ) ) );
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Fixing database permissions";
}
}
@@ -0,0 +1,41 @@
<?php
/**
* @brief 4.4.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 15 Feb 2019
*/
namespace IPS\cms\setup\upg_104009;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 4.4.1 Upgrade Code
*/
class _Upgrade
{
/**
* Rebuild reciprocal links
*
* @return void
*/
public function finish()
{
\IPS\cms\Databases::rebuildReciprocalLinkMaps();
return TRUE;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}
@@ -0,0 +1,40 @@
[
{
"method": "delete",
"params": [
"core_sys_lang_words",
[
"word_app='cms' AND word_key IN('cms_use_different_gateway','cms_use_different_gateway_desc','cms_root_page_url','pages_gateway_url_not_exist','cms_pages_different_gateway_impossible','pages_different_gateway_load_error','pages_different_gateway_load_error_rewrite','cms_root_page_url_rewrite_desc', 'cms_error_page', 'cms_error_page_desc', 'cms_error_page_none', 'cms_pages_settings' )"
]
]
},
{
"method": "delete",
"params": [
"core_sys_conf_settings",
[
"conf_key='cms_use_different_gateway'"
]
]
},
{
"method": "addColumn",
"params": [
"cms_databases",
{
"name": "database_canonical_flag",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": true,
"default": "0",
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
}
]
@@ -0,0 +1,194 @@
<?php
/**
* @brief {version_human} 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 24 Jun 2019
*/
namespace IPS\cms\setup\upg_104030;
/* 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;
}
/**
* {version_human} Upgrade Code
*/
class _Upgrade
{
/**
* Fix Record and Comment Hide Reasons
*
* @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()
{
/* Init */
$perCycle = 250;
$did = 0;
$lastId = \IPS\Request::i()->extra ? \intval( \IPS\Request::i()->extra ) : 0;
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
foreach( \IPS\Db::i()->select( 'sdl_id, sdl_obj_id', 'core_soft_delete_log', array( 'sdl_obj_key=? AND sdl_id > ?', 'ccs-records', $lastId ) ) as $hide )
{
/* Timeout? */
if( $cutOff !== null AND time() >= $cutOff )
{
return $lastId;
}
/* Step up */
$did++;
$lastId = $hide['sdl_id'];
$hidekey = NULL;
$items = 0;
foreach( \IPS\cms\Databases::databases() as $key => $db )
{
/* Try to fetch the record */
$item = 'IPS\cms\Records' . $key;
try
{
$record = $item::load( $hide['sdl_obj_id'] );
if ( $record->hidden() )
{
$hidekey = 'css-records' . $key;
$items++;
}
}
catch ( \OutOfRangeException $e ) { }
/* Try to fetch the comment */
try
{
$commentClass = 'IPS\cms\Records\Comment' . $key;
$comment = $commentClass::load( $hide['sdl_obj_id'] );
if ( $comment->hidden() )
{
$hidekey = 'ccs-records' . $key . '-comments';
$items++;
}
}
catch ( \OutOfRangeException $e ) { }
}
/* If we have only one item, we can update the row */
if ( $items == 1 )
{
\IPS\Db::i()->update( 'core_soft_delete_log', array( 'sdl_obj_key' => $hidekey ), array( 'sdl_id=?', $hide['sdl_id'] ) );
}
/* Else just delete the row */
else
{
\IPS\Db::i()->delete( 'core_soft_delete_log', array( 'sdl_id=?', $hide['sdl_id'] ) );
}
}
/* Did we do anything? */
if( $did )
{
return $lastId;
}
else
{
return TRUE;
}
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Fixing database hide reasons";
}
/**
* Fix Record Review Hide Reasons
*
* @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()
{
/* Init */
$perCycle = 250;
$did = 0;
$lastId = \IPS\Request::i()->extra ? \intval( \IPS\Request::i()->extra ) : 0;
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
foreach( \IPS\Db::i()->select( 'sdl_id, sdl_obj_id', 'core_soft_delete_log', array( 'sdl_obj_key=? AND sdl_id > ?', 'ccs-records-review', $lastId ) ) as $hide )
{
/* Timeout? */
if( $cutOff !== null AND time() >= $cutOff )
{
return $lastId;
}
/* Step up */
$did++;
$lastId = $hide['sdl_id'];
$hidekey = NULL;
$items = 0;
foreach ( \IPS\cms\Databases::databases() as $key => $db )
{
/* Try to fetch the review */
try
{
$reviewClass = 'IPS\cms\Records\Review' . $key;
$review = $reviewClass::load( $hide['sdl_obj_id'] );
if ( $review->hidden() )
{
$hidekey = 'ccs-records' . $key . '-reviews';
$items++;
}
}
catch ( \OutOfRangeException $e )
{
}
}
/* If we have only one item, we can update the row */
if ( $items == 1 )
{
\IPS\Db::i()->update( 'core_soft_delete_log', array( 'sdl_obj_key' => $hidekey ), array( 'sdl_id=?', $hide['sdl_id'] ) );
}
/* Else just delete the row */
else
{
\IPS\Db::i()->delete( 'core_soft_delete_log', array( 'sdl_id=?', $hide['sdl_id'] ) );
}
}
/* Did we do anything? */
if( $did )
{
return $lastId;
}
else
{
return TRUE;
}
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Fixing database review hide reasons";
}
}
@@ -0,0 +1,13 @@
{
"added": [
"app=cms&module=databases&controller=categories&do=manage",
"app=cms&module=databases&controller=databases",
"app=cms&module=databases&controller=records&do=manage",
"app=cms&module=pages&controller=blocks",
"app=cms&module=pages&controller=media",
"app=cms&module=pages&controller=pages",
"app=cms&module=pages&controller=templates"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,24 @@
{
"id": 105013,
"name": "4.5.0 Beta 1",
"steps": {
"queries": true,
"lang": true,
"theme": true,
"themeSettings": false,
"javascript": true,
"emailTemplates": false,
"hooks": true,
"acpSearchKeywords": true,
"settings": true,
"tasks": true,
"modules": true,
"widgets": true,
"whatsnew": false,
"customOptions": false,
"customRoutines": true
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,19 @@
{
"added": [
"Forum",
"InternalUrl",
"forums",
"Url",
"Parser",
"Post",
"topics",
"Lang",
"Database",
"Widget",
"Output",
"FriendlyUrl",
"Topic"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,20 @@
{
"files": {
"added": [],
"edited": [
"cms\/admin\/controllers\/databases\/ips.databases.form.js",
"cms\/admin\/controllers\/pages\/ips.pages.form.js",
"cms\/admin\/controllers\/templates\/ips.templates.fileEditor.js",
"cms\/admin\/controllers\/templates\/ips.templates.fileList.js",
"cms\/admin\/controllers\/templates\/ips.templates.main.js"
],
"removed": []
},
"orders": {
"added": [],
"edited": [
"global\/\/dev\/js\/\/library\/\/jquery"
],
"removed": []
}
}
@@ -0,0 +1,50 @@
{
"normal": {
"added": [
"moving_database_comments",
"moving_database_comments_single",
"rebuilding_cms_comment_attachments",
"content_templates_inherit",
"cms_templates_export_description_app",
"cms_template_title_exists",
"database_form_template_link",
"cms_block_list_key",
"cms_theme_template_custom",
"cms_theme_template_default",
"cms_tag_lang",
"add_word_reason_pages",
"rss_import_record_open",
"rss_import_record_hide",
"__api_cms_databases",
"__api_cms_categories",
"block_pagebuildertext",
"block_pagebuildertext_desc",
"block_pagebuilderoembed",
"block_pagebuilderoembed_desc",
"block_pagebuilderupload",
"block_pagebuilderupload_desc",
"pagebuilderupload_upload",
"pagebuilder_text",
"video_url",
"video_cannot_embed",
"block_testimonials",
"block_testimonials_desc",
"widget_testimonials_name",
"widget_testimonials_content",
"testimonials",
"pagebuilderupload_slideshow",
"pagebuilderupload_captions",
"pagebuilderupload_captions_desc",
"pagebuilderupload_urls",
"pagebuilderupload_urls_desc",
"pagebuilderupload_height"
],
"edited": [],
"removed": []
},
"js": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,10 @@
{
"added": [
"admin\/pages",
"admin\/databases",
"front\/pages",
"front\/database"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,228 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "cms_template_conflicts",
"columns": {
"conflict_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "conflict_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_key": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 32,
"name": "conflict_key",
"type": "CHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_item_id": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "conflict_item_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_type": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "template",
"length": 10,
"name": "conflict_type",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_original_group": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 100,
"name": "conflict_original_group",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_group": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 100,
"name": "conflict_group",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_location": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 255,
"name": "conflict_location",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_title": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 255,
"name": "conflict_title",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_data": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "conflict_data",
"type": "TEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_content": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 0,
"name": "conflict_content",
"type": "MEDIUMTEXT",
"unsigned": false,
"values": [],
"zerofill": false
},
"conflict_date": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "conflict_date",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"conflict_id"
]
},
"conflict_key": {
"type": "key",
"name": "conflict_key",
"length": [
null,
null
],
"columns": [
"conflict_key",
"conflict_type"
]
}
},
"collation": "utf8_general_ci",
"engine": "InnoDB"
}
]
},
"2": {
"method": "addIndex",
"params": [
"cms_url_store",
{
"type": "key",
"name": "path_lookup",
"columns": [
"store_type",
"store_path"
],
"length": [
null,
250
]
}
]
},
"3": {
"method": "addIndex",
"params": [
"cms_database_categories",
{
"type": "key",
"name": "forum_integration",
"columns": [
"category_forum_record",
"category_forum_comments"
],
"length": [
null,
null
]
}
]
}
}
@@ -0,0 +1,17 @@
{
"added": [
"cms_error_page",
"cms_promote_cat",
"cms_promote_enabled",
"cms_promote_groups",
"cms_root_page_url",
"cms_root_path",
"page_extension",
"sitemap_databases_count",
"sitemap_databases_priority",
"sitemap_pages_count",
"sitemap_pages_priority"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,7 @@
{
"added": [
"updaterecords"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,46 @@
{
"html": {
"added": [
"admin\/blocks\/rowHtml",
"admin\/databases\/templateGoButton",
"admin\/templates\/templateConflict",
"front\/widgets\/pagebuilderoembed",
"front\/widgets\/pagebuildertext",
"front\/widgets\/pagebuilderupload"
],
"edited": [
"admin\/databases\/rebuildCommentCounts",
"admin\/databases\/rebuildTopics",
"front\/global\/basicRelationship",
"front\/global\/embedRecord",
"front\/global\/embedRecordComment",
"front\/global\/embedRecordReview",
"front\/global\/recordResultSnippet",
"admin\/media\/media",
"front\/records\/commentTemplate",
"global\/records\/customslug",
"global\/records\/soundcloud",
"global\/records\/spotify",
"global\/records\/youtube",
"front\/revisions\/rows",
"admin\/templates\/templates",
"front\/widgets\/Categories",
"front\/widgets\/RecordFeed"
],
"removed": []
},
"css": {
"added": [],
"edited": [
"admin\/media\/media.css",
"front\/pages\/page.css",
"admin\/templates\/templates.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,145 @@
<?php
/**
* @brief 4.5.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 10 Sep 2019
*/
namespace IPS\cms\setup\upg_105013;
/* 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.5.0 Beta 1 Upgrade Code
*/
class _Upgrade
{
/**
* Adjust database indexes
*
* @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()
{
$queries = array();
foreach( \IPS\Db::i()->select( 'database_id', 'cms_databases' ) as $database )
{
$queries[] = array(
'table' => 'cms_custom_database_' . $database,
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "cms_custom_database_{$database} DROP KEY `category_id`, ADD KEY `category_id` (`category_id`,`record_last_comment`), ADD KEY `future_entries` (`record_future_date`,`record_publish_date`)"
);
}
if( \count( $queries ) )
{
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'cms', 'extra' => array( '_upgradeStep' => 2 ) ) );
/* Queries to run manually */
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr ) ) ) );
}
}
return TRUE;
}
/**
* Custom title for this step
*
* @return string
*/
public function step1CustomTitle()
{
return "Improving performance for custom Pages databases";
}
/**
* Fix templates
*
* @return boolean
*/
public function step2()
{
/* Update existing template bits */
foreach( \IPS\Db::i()->select( '*', 'cms_templates', array( 'template_master=0 and template_user_created=1 and template_user_edited=1' ) ) as $key => $template )
{
$obj = \IPS\cms\Templates::constructFromData( $template );
if ( $obj->getMasterOfThis() and ! $obj->isDifferentFromMaster() )
{
/* It's not different from the master template, so remove the user_edited flag */
$obj->user_edited = 0;
$obj->save();
}
}
return TRUE;
}
/**
* Upgrade WYSIWYG Blocks
*
* @return bool
*/
public function step3()
{
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'cms_blocks', array( "block_type=?", 'custom' ) ), 'IPS\cms\Blocks\Block' ) AS $block )
{
if ( $block->getConfig('editor') !== 'editor' )
{
continue;
}
\IPS\Lang::saveCustom( 'cms', "cms_block_content_{$block->id}", $block->content );
$block->content = NULL;
$block->save();
}
return TRUE;
}
/**
* Custom Title for this step
*
* @return string
*/
public function step3CustomTitle()
{
return "Upgrading WYSIWYG blocks";
}
/**
* Custom title for this step
*
* @return string
*/
public function step2CustomTitle()
{
return "Fixing database templates";
}
/**
* 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)
*/
public function finish()
{
\IPS\Task::queue( 'cms', 'FixCommentAttachments', array(), 4 );
return TRUE;
}
}
@@ -0,0 +1,16 @@
{
"added": [
"Database",
"Wysiwyg",
"DatabaseFilters",
"Categories",
"Blocks",
"RecordFeed",
"Rss",
"pagebuildertext",
"pagebuilderoembed",
"pagebuilderupload"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,24 @@
{
"id": 105014,
"name": "4.5.0 Beta 1",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105015,
"name": "4.5.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": true,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"files": {
"added": [],
"edited": [],
"removed": []
},
"orders": {
"added": [],
"edited": [
"global\/\/dev\/js\/\/library\/\/jquery"
],
"removed": []
}
}
@@ -0,0 +1,24 @@
{
"id": 105016,
"name": "4.5.0 Beta 3",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105017,
"name": "4.5.0 Beta 4",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,19 @@
{
"html": {
"added": [],
"edited": [
"front\/global\/commentTableHeader"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,24 @@
{
"id": 105018,
"name": "4.5.0 Beta 4",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105019,
"name": "4.5.0 Beta 4",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105020,
"name": "4.5.0 Beta 4",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105021,
"name": "4.5.0 Beta 5",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105022,
"name": "4.5.0 Beta 6",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105023,
"name": "4.5.0 Beta 6",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105024,
"name": "4.5.0 Beta 7",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105025,
"name": "4.5.0 Beta 8",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105026,
"name": "4.5.0 Beta 8",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105027,
"name": "4.5.0 Beta 8",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105028,
"name": "4.5.0 Beta 9",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": true,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"files": {
"added": [],
"edited": [
"cms\/admin\/controllers\/templates\/ips.templates.fileEditor.js"
],
"removed": []
},
"orders": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,24 @@
{
"id": 105029,
"name": "4.5.0 Beta 10",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"html": {
"added": [],
"edited": [
"admin\/blocks\/pluginSelector",
"front\/global\/uploadDisplay",
"global\/records\/youtube",
"admin\/templates\/addForm",
"admin\/templates\/menu",
"front\/widgets\/pagebuilderupload"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,24 @@
{
"id": 105030,
"name": "4.5.0 Beta 11",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105031,
"name": "4.5.0 Beta 11",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,24 @@
{
"id": 105032,
"name": "4.5.0 Beta 12",
"steps": {
"queries": false,
"lang": true,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"normal": {
"added": [
"cms_number_none"
],
"edited": [],
"removed": []
},
"js": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,24 @@
{
"id": 105100,
"name": "4.5.0",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeSettings": false,
"javascript": false,
"emailTemplates": false,
"hooks": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"whatsnew": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
+1 -1
View File
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_11002;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
+1 -1
View File
@@ -12,7 +12,7 @@
namespace IPS\cms\setup\upg_11003;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
Loaded 100 of 3791 files, more files were not shown because too many files have changed in this diff. Show more