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

+14 -14
View File
@@ -12,7 +12,7 @@
namespace IPS\blog\setup\upg_100002;
/* 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;
@@ -53,7 +53,7 @@ class _Upgrade
*/
public function step2()
{
$limit = isset( \IPS\Request::i()->extra ) ? intval( \IPS\Request::i()->extra ) : 0;
$limit = isset( \IPS\Request::i()->extra ) ? \intval( \IPS\Request::i()->extra ) : 0;
$select = \IPS\Db::i()->select( '*', 'blog_polls', NULL, 'poll_id ASC', array( $limit, 1000 ) );
@@ -67,7 +67,7 @@ class _Upgrade
/* Sometimes data from 3.4.x isn't always as well formed as we'd like, especially when non-latin chars are involved */
$data = unserialize( $poll['choices'] );
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$poll['choices'] = str_replace( '\\"', '"', $poll['choices'] );
$data = unserialize( $poll['choices'] );
@@ -75,23 +75,23 @@ class _Upgrade
$_decoded = FALSE;
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$data = unserialize( utf8_decode( $poll['choices'] ) );
if( is_array( $data ) )
if( \is_array( $data ) )
{
$_decoded = TRUE;
}
}
if( is_array( $data ) AND $_decoded )
if( \is_array( $data ) AND $_decoded )
{
foreach( $data as $_key => $_data )
{
$data[ $_key ]['question'] = utf8_encode( $_data[ $_key ]['question'] );
if( is_array( $_data['choice'] ) )
if( \is_array( $_data['choice'] ) )
{
foreach( $_data['choice'] as $_idx => $_choice )
{
@@ -108,24 +108,24 @@ class _Upgrade
{
$data = unserialize( $poll['choices'] );
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$poll['choices'] = str_replace( '\\"', '"', $poll['choices'] );
$data = unserialize( $poll['choices'] );
}
if( !is_array( $data ) )
if( !\is_array( $data ) )
{
$data = unserialize( utf8_decode( $poll['choices'] ) );
}
if( is_array( $data ) )
if( \is_array( $data ) )
{
foreach( $data as $_key => $_data )
{
$data[ $_key ]['question'] = utf8_encode( $_data['question'] );
if( is_array( $_data['choice'] ) )
if( \is_array( $_data['choice'] ) )
{
foreach( $_data['choice'] as $_idx => $_choice )
{
@@ -166,7 +166,7 @@ class _Upgrade
*/
public function step2CustomTitle()
{
return "Upgrading polls...";
return "Upgrading polls";
}
/**
@@ -176,7 +176,7 @@ class _Upgrade
*/
public function step3()
{
$limit = isset( \IPS\Request::i()->extra ) ? intval( \IPS\Request::i()->extra ) : 0;
$limit = isset( \IPS\Request::i()->extra ) ? \intval( \IPS\Request::i()->extra ) : 0;
$select = \IPS\Db::i()->select( '*', 'blog_voters', NULL, 'vote_id ASC', array( $limit, 1000 ) );
@@ -211,6 +211,6 @@ class _Upgrade
*/
public function step3CustomTitle()
{
return "Upgrading polls...";
return "Upgrading poll voters";
}
}
@@ -12,7 +12,7 @@
namespace IPS\blog\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\blog\setup\upg_100016;
/* 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\blog\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\blog\setup\upg_100021;
/* 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\blog\setup\upg_100027;
/* 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\blog\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\blog\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.
@@ -12,7 +12,7 @@
namespace IPS\blog\setup\upg_100038;
/* 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\blog\setup\upg_101016;
/* 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\blog\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;
@@ -32,7 +32,7 @@ class _Upgrade
{
$perCycle = 1000;
$did = 0;
$limit = intval( \IPS\Request::i()->extra );
$limit = \intval( \IPS\Request::i()->extra );
/* Try to prevent timeouts to the extent possible */
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
@@ -81,6 +81,6 @@ class _Upgrade
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'blog_rss_import', array( "rss_member=?", 0 ) )->first();
}
return "Fixing Blog RSS Imports (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
return "Fixing blog RSS imports (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
}
}
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -12,7 +12,7 @@
namespace IPS\blog\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;
@@ -0,0 +1,32 @@
{
"1": {
"method": "dropIndex",
"params": [
"blog_entries",
"entry_category_id"
]
},
"2": {
"method": "dropIndex",
"params": [
"blog_rss_import",
"rss_blog_id"
]
},
"3": {
"method": "addIndex",
"params": [
"blog_rss_import",
{
"type": "key",
"name": "member",
"columns": [
"rss_member"
],
"length": [
null
]
}
]
}
}
@@ -0,0 +1,21 @@
{
"added": [
"app=blog&module=blogs&controller=blogs",
"app=blog&module=blogs&controller=blogs&do=form",
"app=blog&module=blogs&controller=blogs&searchResult=blog_desc_wrap",
"app=blog&module=blogs&controller=blogs&searchResult=blog_member_id",
"app=blog&module=blogs&controller=blogs&searchResult=blog_name",
"app=blog&module=blogs&controller=blogs&searchResult=form_new_blog_enable_rss",
"app=blog&module=blogs&controller=blogs&searchResult=form_new_blog_type",
"app=blog&module=blogs&controller=settings",
"app=blog&module=blogs&controller=settings&searchResult=form_blog_allow_rss",
"app=blog&module=blogs&controller=settings&searchResult=form_blog_allow_rssimport",
"app=blog&module=blogs&controller=settings&searchResult=form_blog_enable_rating",
"app=blog&module=blogs&controller=settings&searchResult=form_blog_enable_sidebar",
"app=core&module=members&controller=groups&searchResult=4_g_blog_allowlocal",
"app=core&module=members&controller=groups&searchResult=g_blog_allowdelete",
"app=core&module=members&controller=groups&searchResult=g_blog_allowprivate"
],
"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": false,
"acpSearchKeywords": true,
"settings": true,
"tasks": false,
"modules": true,
"widgets": true,
"whatsnew": false,
"customOptions": false,
"customRoutines": true
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,17 @@
{
"files": {
"added": [
"blog\/front\/controllers\/view\/ips.view.manageCategories.js",
"blog\/front\/templates\/ips.templates.view.js"
],
"edited": [],
"removed": []
},
"orders": {
"added": [],
"edited": [
"global\/\/dev\/js\/\/library\/\/jquery"
],
"removed": []
}
}
@@ -0,0 +1,59 @@
{
"normal": {
"added": [
"blog_allow_rssimport_desc",
"entry_category_choice",
"entry_category_choice_new",
"entry_category_choice_existing",
"stats_overview_blogs",
"stats_overview_blogs_desc",
"entry_posted_with_cat",
"entry_future_posted_with_cat",
"entry_name_with_cat",
"blog_category_viewing",
"blog_category_select",
"modperms__blog_Blogs",
"can_mod_blogs",
"menu__blog_blogs_categories",
"blog_categories",
"blog_create_category",
"blog_categories_add_child",
"blog_category_id",
"category_basic_settings",
"blog_category_desc",
"category_parent",
"category_desc_placeholder",
"__api_blog_categories",
"entry_category_id",
"blog_entry_new_category",
"blog_entry_category_new",
"blog_category_heading",
"blog_manage_entry_categories",
"blog_entry_categories",
"blog_error_missing_name",
"blog_error_not_find_category",
"blog_categories_all",
"no_entries_in_cat",
"__api_blog_entrycategories"
],
"edited": [
"blog_entry_auto_follow_suffix",
"blog_by",
"group_blog_by",
"modperms__core_Content_blog_Entry"
],
"removed": [
"blog_allow_rss_desc"
]
},
"js": {
"added": [
"blog_category_confirm_delete",
"blog_category_confirm_delete_desc",
"manage_cats_new_row",
"entry_cat_order_saved"
],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,8 @@
{
"added": [
"admin\/blogs",
"front\/blogs"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,396 @@
{
"1": {
"method": "createTable",
"params": [
{
"name": "blog_categories",
"columns": {
"category_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 5,
"name": "category_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"category_seo_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "category_seo_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"category_position": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "category_position",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"category_parent": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "category_parent",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"category_id"
]
},
"pg_position": {
"type": "key",
"name": "pg_position",
"length": [
null
],
"columns": [
"category_position"
]
},
"pg_parent": {
"type": "key",
"name": "pg_parent",
"length": [
null
],
"columns": [
"category_parent"
]
}
}
}
]
},
"2": {
"method": "createTable",
"params": [
{
"name": "blog_entry_categories",
"columns": {
"entry_category_id": {
"allow_null": false,
"auto_increment": true,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 10,
"name": "entry_category_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"entry_category_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "entry_category_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"entry_category_seo_name": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": null,
"length": 255,
"name": "entry_category_seo_name",
"type": "VARCHAR",
"unsigned": false,
"values": [],
"zerofill": false
},
"entry_category_position": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 5,
"name": "entry_category_position",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"entry_category_blog_id": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "",
"length": 10,
"name": "entry_category_blog_id",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
},
"entry_category_count": {
"allow_null": false,
"auto_increment": false,
"binary": false,
"comment": "",
"decimals": null,
"default": "0",
"length": 10,
"name": "entry_category_count",
"type": "INT",
"unsigned": false,
"values": [],
"zerofill": false
}
},
"indexes": {
"PRIMARY": {
"type": "primary",
"name": "PRIMARY",
"length": [
null
],
"columns": [
"entry_category_id"
]
},
"pg_position": {
"type": "key",
"name": "pg_position",
"length": [
null
],
"columns": [
"entry_category_position"
]
}
}
}
]
},
"3": {
"method": "addColumn",
"params": [
"blog_blogs",
{
"name": "blog_category_id",
"type": "BIGINT",
"length": 20,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"4": {
"method": "update",
"params": [
"blog_blogs",
{
"blog_category_id": 1
}
]
},
"5": {
"method": "addColumn",
"params": [
"blog_entries",
{
"name": "entry_category_id",
"type": "INT",
"length": 10,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": true,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"6": {
"method": "addIndex",
"params": [
"blog_blogs",
{
"type": "key",
"name": "blog_category_id",
"columns": [
"blog_category_id"
],
"length": [
null
]
}
]
},
"7": {
"method": "addColumn",
"params": [
"blog_entries",
{
"name": "entry_append_edit",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"8": {
"method": "addColumn",
"params": [
"blog_entries",
{
"name": "entry_edit_show",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"9": {
"method": "dropColumn",
"params": [
"blog_entries",
"entry_edit_show"
]
},
"10": {
"method": "addColumn",
"params": [
"blog_entries",
{
"name": "entry_edit_reason",
"type": "VARCHAR",
"length": 255,
"decimals": null,
"values": null,
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"zerofill": false,
"auto_increment": false,
"binary": false
}
]
},
"11": {
"method": "delete",
"params": [
"core_sys_lang_words",
[
"word_key=?",
"blog_allow_rss_desc"
]
]
},
"12": {
"method": "changeColumn",
"params": [
"blog_comments",
"comment_text",
{
"name": "comment_text",
"type": "MEDIUMTEXT",
"length": 0,
"decimals": null,
"values": [],
"allow_null": true,
"default": null,
"comment": "",
"unsigned": false,
"auto_increment": false
}
]
},
"13": {
"method": "changeColumn",
"params": [
"blog_entries",
"entry_meta_data",
{
"name": "entry_meta_data",
"type": "TINYINT",
"length": 1,
"decimals": null,
"values": null,
"allow_null": false,
"default": "0",
"comment": "",
"unsigned": true,
"auto_increment": false
}
]
}
}
@@ -0,0 +1,12 @@
{
"added": [
"blog_allow_grid",
"blog_allow_rss",
"blog_allow_rssimport",
"blog_enable_rating",
"blog_enable_sidebar",
"blog_view_mode"
],
"edited": [],
"removed": []
}
@@ -0,0 +1,49 @@
{
"html": {
"added": [
"front\/browse\/categories",
"front\/global\/blogCategoryLink",
"front\/global\/categoryLink",
"front\/view\/categories",
"front\/view\/manageCategories"
],
"edited": [
"front\/browse\/featuredEntries",
"front\/browse\/index",
"front\/browse\/indexButtons",
"front\/browse\/indexGrid",
"front\/browse\/indexGridEntry",
"front\/browse\/rows",
"front\/global\/commentTableHeader",
"front\/global\/embedBlogs",
"front\/global\/embedEntry",
"front\/global\/embedEntryComment",
"front\/global\/profileBlogRows",
"front\/submit\/submitFormTemplate",
"front\/view\/blogViewLarge",
"front\/view\/blogViewMedium",
"front\/view\/comments",
"front\/view\/coverPhotoOverlay",
"front\/view\/entry",
"front\/view\/noEntries",
"front\/view\/view",
"front\/widgets\/blogCommentFeed",
"front\/widgets\/blogs"
],
"removed": []
},
"css": {
"added": [],
"edited": [
"front\/blog.css",
"front\/grid.css",
"front\/profile.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,110 @@
<?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 Blogs
* @since 01 Aug 2019
*/
namespace IPS\blog\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
{
/**
* Set up categories
*
* @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()
{
$category = new \IPS\blog\Category;
$category->seo_name = 'general';
$category->save();
\IPS\Lang::saveCustom( 'blog', "blog_category_{$category->id}", "General" );
return TRUE;
}
/**
* Convert RSS imports over
*
* @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()
{
/* Move over blog_rss_import to core_rss_import */
foreach( \IPS\Db::i()->select( '*', 'blog_rss_import' ) as $rss )
{
try
{
$blog = \IPS\blog\Blog::load( $rss['rss_blog_id'] );
}
catch( \Exception $e )
{
continue;
}
$newImportId = \IPS\Db::i()->insert( 'core_rss_import', array(
'rss_import_enabled' => 1,
'rss_import_title' => $blog->titleForLog(),
'rss_import_url' => $rss['rss_url'],
'rss_import_auth_user' => $rss['rss_auth_user'],
'rss_import_auth_pass' => $rss['rss_auth_pass'],
'rss_import_class' => 'IPS\\blog\\Entry',
'rss_import_node_id' => $rss['rss_blog_id'],
'rss_import_member' => $rss['rss_member'],
'rss_import_time' => 0,
'rss_import_last_import' => $rss['rss_last_import'],
'rss_import_showlink' => $rss['rss_import_show_link'],
'rss_import_topic_pre' => '',
'rss_import_auto_follow' => 0,
'rss_import_settings' => json_encode( array(
'tags' => $rss['rss_tags']
) )
) );
/* Prevent multiple runs from breaking */
try
{
\IPS\Db::i()->delete( 'core_rss_imported', array( 'rss_imported_import_id=?', $newImportId ) );
\IPS\Db::i()->query( "INSERT INTO " . \IPS\Db::i()->prefix . "core_rss_imported
(rss_imported_guid, rss_imported_content_id, rss_imported_import_id )
( SELECT a.rss_imported_guid, a.rss_imported_entry_id, {$newImportId} FROM " . \IPS\Db::i()->prefix . "blog_rss_imported a)" );
}
catch( \Exception $e ) { }
}
return TRUE;
}
/**
* Finish
*
* @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()
{
/* Delete old language strings */
\IPS\Db::i()->delete( 'core_tasks', array( '`key`=?', 'blogrssimport' ) );
/* Delete old RSS Table */
\IPS\Db::i()->dropTable( array( 'blog_rss_import', 'blog_rss_imported' ) );
return TRUE;
}
}
@@ -0,0 +1,10 @@
{
"added": [
"blogStatistics",
"entryFeed",
"blogCommentFeed",
"blogs"
],
"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": true,
"theme": true,
"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,14 @@
{
"normal": {
"added": [],
"edited": [],
"removed": []
},
"js": {
"added": [],
"edited": [
"blog_category_confirm_delete"
],
"removed": []
}
}
@@ -0,0 +1,20 @@
{
"html": {
"added": [],
"edited": [
"front\/view\/entry",
"front\/view\/view"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"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": 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,20 @@
{
"html": {
"added": [],
"edited": [
"front\/browse\/index",
"front\/browse\/indexGrid"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -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": 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\/browse\/indexButtons"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"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,19 @@
{
"html": {
"added": [],
"edited": [
"front\/submit\/submitFormTemplate"
],
"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": 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": 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
}
@@ -12,7 +12,7 @@
namespace IPS\blog\setup\upg_22002;
/* 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\blog\setup\upg_23000;
/* 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
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $queries );
if ( count( $toRun ) )
if ( \count( $toRun ) )
{
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'blog', 'extra' => array( '_upgradeStep' => 2 ) ) );
+12 -5
View File
@@ -12,7 +12,7 @@
namespace IPS\blog\setup\upg_40000;
/* 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;
@@ -90,14 +90,21 @@ class _Upgrade
}
else
{
$columns = array( 'blog_name', 'blog_desc', 'blog_groupblog_name' );
$columns = array( 'blog_name', 'blog_desc', 'blog_groupblog_name', 'blog_type' );
if( \IPS\Db::i()->checkForColumn( 'blog_blogs', 'blog_type' ) )
foreach( $columns as $id => $column )
{
$columns[] = 'blog_type';
if( !\IPS\Db::i()->checkForColumn( 'blog_blogs', $column ) )
{
unset( $columns[$id] );
}
}
if( \count( $columns ) )
{
\IPS\Db::i()->dropColumn( 'blog_blogs', $columns );
}
\IPS\Db::i()->dropColumn( 'blog_blogs', $columns );
unset( $_SESSION['_step1Count'] );
return TRUE;