Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 30 Oct 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 12 Dec 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -40,10 +40,10 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr ) ) ) );
|
||||
return 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 ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* @brief 4.0.0 RC 1 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Board
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 3 Feb 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 15 Jan 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* @brief 4.0.0 RC 5 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Blog
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 5 May 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief 4.0.0 RC6 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 18 Mar 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
|
||||
Whitespace-only changes.
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Blog
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 5 May 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief 4.0.7 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 27 May 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @brief 4.0.8 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 15 Jan 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 19 Jun 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 15 Jan 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -17,14 +17,10 @@
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"forums_posts",
|
||||
"use_sig"
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"forums_posts",
|
||||
"use_emo"
|
||||
[
|
||||
"use_sig",
|
||||
"use_emo"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.0 Beta 10 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 22 Oct 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101009;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.0 Beta 10 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Step 1
|
||||
* Fix the first post flagged for topics
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
$perCycle = 500;
|
||||
$did = 0;
|
||||
$limit = intval( \IPS\Request::i()->extra );
|
||||
|
||||
/* Try to prevent timeouts to the extent possible */
|
||||
$cutOff = \IPS\core\Setup\Upgrade::determineCutoff();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_topics', array( 'topic_firstpost=?', 0 ), 'tid ASC', array( $limit, $perCycle ) ) as $topic )
|
||||
{
|
||||
if( $cutOff !== null AND time() >= $cutOff )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
|
||||
$did++;
|
||||
|
||||
try
|
||||
{
|
||||
$firstPost = \IPS\Db::i()->select( 'pid', 'forums_posts', array( 'topic_id=?', $topic['tid'] ), 'post_date ASC', array( 1 ) )->first();
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'forums_topics', array( 'topic_firstpost' => $firstPost ), 'tid=' . $topic['tid'] );
|
||||
}
|
||||
|
||||
if( $did )
|
||||
{
|
||||
return ( $limit + $did );
|
||||
}
|
||||
else
|
||||
{
|
||||
unset( $_SESSION['_step1Count'] );
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array(
|
||||
array(
|
||||
'table' => 'forums_posts',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_posts SET new_topic=1 WHERE pid IN ( SELECT topic_firstpost FROM " . \IPS\Db::i()->prefix . "forums_topics )"
|
||||
)
|
||||
) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 2, '_upgradeData' => 0 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
$limit = isset( \IPS\Request::i()->extra ) ? \IPS\Request::i()->extra : 0;
|
||||
|
||||
if( !isset( $_SESSION['_step1Count'] ) )
|
||||
{
|
||||
$_SESSION['_step1Count'] = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics' )->first();
|
||||
}
|
||||
|
||||
$message = "Fixing flagged first posts (Upgraded so far: " . ( ( $limit > $_SESSION['_step1Count'] ) ? $_SESSION['_step1Count'] : $limit ) . ' out of ' . $_SESSION['_step1Count'] . ')';
|
||||
|
||||
return $message;
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @brief 4.1.2 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 29 Oct 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
{
|
||||
"sub_can_post": 0
|
||||
},
|
||||
[
|
||||
"parent_id=?",
|
||||
-1
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -10,9 +10,11 @@
|
||||
"columns": [
|
||||
"topic_id",
|
||||
"queued",
|
||||
"post_date"
|
||||
"post_date",
|
||||
"author_id"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
+19
-14
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.0.12 Upgrade Code
|
||||
* @brief 4.1.4 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 21 Jul 2015
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 06 Nov 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_100042;
|
||||
namespace IPS\forums\setup\upg_101016;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -19,28 +20,32 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.0.12 Upgrade Code
|
||||
* 4.1.4 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix new_topic flag if it is incorrectly set from an older version
|
||||
* Fixing incorrectly hidden posts
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'forums_posts',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_posts SET new_topic=0 WHERE new_topic=1 AND pid NOT IN( SELECT topic_firstpost FROM " . \IPS\Db::i()->prefix . "forums_topics)"
|
||||
) ) );
|
||||
$toRunQueries = array(
|
||||
array(
|
||||
'table' => 'forums_posts',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_posts SET queued=0 WHERE (queued=2 AND topic_id IN( SELECT tid FROM " . \IPS\Db::i()->prefix . "forums_topics WHERE approved=1 ) )",
|
||||
)
|
||||
);
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 2, '_upgradeData' => 0 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr ) ) ) );
|
||||
return 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;
|
||||
@@ -53,6 +58,6 @@ class _Upgrade
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing flagged first posts";
|
||||
return "Fixing incorrectly hidden posts";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.5 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 23 Nov 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101018;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.5 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Find forums where the parent/child mapping creates an infinite loop
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
$count = \IPS\Db::i()->select( 'COUNT(*)', array( 'forums_forums', 'f1' ), 'f1.parent_id=f2.id' )->join( array( 'forums_forums', 'f2' ), 'f1.id=f2.parent_id' )->first();
|
||||
|
||||
if( $count )
|
||||
{
|
||||
/* Create a new category */
|
||||
$category = new \IPS\forums\Forum;
|
||||
$category->parent_id = -1;
|
||||
$category->forum_parent_id = 0;
|
||||
$category->forum_min_posts_view = 0;
|
||||
$category->forum_can_view_others = 1;
|
||||
$category->forum_sort_key = 'last_post';
|
||||
$category->forum_permission_showtopic = 0;
|
||||
$category->save();
|
||||
|
||||
\IPS\Lang::saveCustom( 'forums', 'forums_forums_' . $category->id, "Temporary Category" );
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'f1.*', array( 'forums_forums', 'f1' ), 'f1.parent_id=f2.id' )->join( array( 'forums_forums', 'f2' ), 'f1.id=f2.parent_id' ) as $forum )
|
||||
{
|
||||
\IPS\Db::i()->update( 'forums_forums', array( 'parent_id' => $category->id ), array( 'id=?', $forum['id'] ) );
|
||||
}
|
||||
|
||||
$category->setLastComment();
|
||||
$category->save();
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing incorrectly mapped forums";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix container counts that may be off due to bug with unapproved topics
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 5, array( 'class' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return "Rebuilding forum post counts";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.7 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 04 Jan 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101023;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.7 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Trigger background task
|
||||
*
|
||||
* @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\Task::queue( 'forums', 'TopicStarterIds', array(), 4 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Updating topic starter IDs";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
{
|
||||
"ipseo_priority": "-1"
|
||||
},
|
||||
[
|
||||
"ipseo_priority=?",
|
||||
""
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.7 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 04 Jan 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101026;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.9 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Trigger background task
|
||||
*
|
||||
* @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\Task::queue( 'forums', 'HiddenFirstPost', array(), 4 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Updating incorrectly hidden topics";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.10 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
{subpackage}
|
||||
* @since 12 Apr 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101027;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.10 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Rebuild container counts
|
||||
*
|
||||
* @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\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 5, array( 'class' ) );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.11 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
{subpackage}
|
||||
* @since 12 Apr 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101028;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.11 Upgrade Code
|
||||
*/
|
||||
class _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\Task::queue( 'forums', 'RebuildNewTopicFlag', array(), 4 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Fixing first posts";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"forums_topics",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "last_true_post",
|
||||
"columns": [
|
||||
"forum_id",
|
||||
"pinned",
|
||||
"last_post"
|
||||
],
|
||||
"length": [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.14 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 07 Jul 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101042;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.14 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Recount categories in case pending topics/posts count is off
|
||||
*
|
||||
* @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\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 5, array( 'class' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addIndex",
|
||||
"params": [
|
||||
"forums_archive_posts",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "archive_forum_id",
|
||||
"columns": [
|
||||
"archive_forum_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"forums_topics",
|
||||
"last_post",
|
||||
{
|
||||
"name": "last_post",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "delete",
|
||||
"params": [
|
||||
"forums_archive_rules",
|
||||
[
|
||||
"archive_app=? AND archive_field=? AND archive_text=?",
|
||||
"forums",
|
||||
"member",
|
||||
""
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.19 Beta 1 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 27 Jan 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_101090;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.19 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Add index to forums_archive_posts (taking into account it may be in a remote database)
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
/* If we already have an index on the ip address AND the queued column, we can just move along. */
|
||||
if( \IPS\forums\Topic\ArchivedPost::db()->checkForIndex( 'forums_archive_posts', 'archive_ip_address' ) AND
|
||||
\IPS\forums\Topic\ArchivedPost::db()->checkForIndex( 'forums_archive_posts', 'archive_queued' ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get the query that needs to be ran */
|
||||
$missingIndexes = array();
|
||||
|
||||
if( !\IPS\forums\Topic\ArchivedPost::db()->checkForIndex( 'forums_archive_posts', 'archive_ip_address' ) )
|
||||
{
|
||||
$missingIndexes[] = \IPS\forums\Topic\ArchivedPost::db()->buildIndex( 'forums_archive_posts', array( 'type' => 'key', 'name' => 'archive_ip_address', 'columns' => array( 'archive_ip_address' ) ) );
|
||||
}
|
||||
|
||||
if( !\IPS\forums\Topic\ArchivedPost::db()->checkForIndex( 'forums_archive_posts', 'archive_queued' ) )
|
||||
{
|
||||
$missingIndexes[] = \IPS\forums\Topic\ArchivedPost::db()->buildIndex( 'forums_archive_posts', array( 'type' => 'key', 'name' => 'archive_queued', 'columns' => array( 'archive_queued', 'archive_content_date' ) ) );
|
||||
}
|
||||
|
||||
$query = "ALTER TABLE `" . \IPS\forums\Topic\ArchivedPost::db()->prefix . \IPS\forums\Topic\ArchivedPost::db()->escape_string( 'forums_archive_posts' ) . "` " . implode( ', ', $missingIndexes );
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'forums_archive_posts',
|
||||
'query' => $query,
|
||||
'db' => \IPS\forums\Topic\ArchivedPost::db()
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 2, '_upgradeData' => 0 ) ) );
|
||||
|
||||
/* 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 "Updating archived posts table for performance";
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,10 @@
|
||||
/**
|
||||
* @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.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 5 Jun 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -468,6 +468,16 @@
|
||||
]
|
||||
},
|
||||
"18": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
{
|
||||
"topics": 0
|
||||
},
|
||||
"topics IS NULL"
|
||||
]
|
||||
},
|
||||
"19": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
@@ -488,7 +498,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"19": {
|
||||
"20": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
@@ -509,7 +519,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"20": {
|
||||
"21": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
@@ -527,5 +537,31 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"22": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_sys_conf_settings",
|
||||
{
|
||||
"conf_key": "forums_topics_per_page"
|
||||
},
|
||||
[
|
||||
"conf_key=?",
|
||||
"display_max_topics"
|
||||
]
|
||||
]
|
||||
},
|
||||
"23": {
|
||||
"method": "update",
|
||||
"params": [
|
||||
"core_sys_conf_settings",
|
||||
{
|
||||
"conf_key": "forums_posts_per_page"
|
||||
},
|
||||
[
|
||||
"conf_key=?",
|
||||
"display_max_posts"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* @brief 4.0.0 Alpha 1 Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Board
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Forums
|
||||
* @since 15 Jan 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -273,13 +273,14 @@ class _Upgrade
|
||||
$dropLastPost = \IPS\Db::i()->checkForIndex( 'forums_topics', 'last_post' ) ? "DROP INDEX last_post," : '';
|
||||
$dropLastPostSorting = \IPS\Db::i()->checkForIndex( 'forums_topics', 'last_post_sorting' ) ? ",\nDROP INDEX last_post_sorting" : '';
|
||||
$dropHasAttach = \IPS\Db::i()->checkForColumn( 'forums_topics', 'topic_hasattach' ) ? "DROP COLUMN topic_hasattach," : '';
|
||||
$dropHasTDelete = \IPS\Db::i()->checkForColumn( 'forums_topics', 'tdelete_time' ) ? "DROP COLUMN tdelete_time," : '';
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'forums_topics',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "forums_topics {$description}
|
||||
{$dropHasAttach}
|
||||
DROP COLUMN topic_deleted_posts,
|
||||
DROP COLUMN tdelete_time,
|
||||
{$dropHasTDelete}
|
||||
DROP COLUMN seo_last_name,
|
||||
DROP COLUMN seo_first_name,
|
||||
ADD COLUMN popular_time INT(10) NULL DEFAULT NULL COMMENT 'Timestamp of when this topic will stop being popular.',
|
||||
@@ -293,15 +294,15 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
),
|
||||
array(
|
||||
'table' => 'forums_topics',
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_topics SET posts=posts+1, last_real_post=last_post"
|
||||
'query' => "UPDATE " . \IPS\Db::i()->prefix . "forums_topics SET posts=posts+1, last_real_post=IFNULL(last_post,0)"
|
||||
) ) );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 5, '_upgradeData' => 0 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 5, '_upgradeData' => 0 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr ) ) ) );
|
||||
return 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;
|
||||
@@ -402,10 +403,10 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 8 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 8 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr, 'extra' => 0 ) ) ) );
|
||||
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, 'extra' => 0 ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -461,9 +462,9 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
|
||||
if ( !\IPS\Request::i()->run_anyway and $archiveDb->select( 'count(*)', 'forums_archive_posts' )->first() > \IPS\UPGRADE_MANUAL_THRESHOLD )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 9 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 9 ) ) );
|
||||
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( array( $query ), \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr, 'extra' => 0 ) ), "You must run this query against your archive database, <strong>{$INFO['archive_remote_sql_database']}</strong> on {$INFO['archive_remote_sql_host']}, <strong>NOT</strong> the normal community database." ) );
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( array( $query ), \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => \IPS\Request::i()->mr, 'extra' => 0 ) ), "You must run this query against your archive database, <strong>{$INFO['archive_remote_sql_database']}</strong> on {$INFO['archive_remote_sql_host']}, <strong>NOT</strong> the normal community database." ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -518,10 +519,10 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 10 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 10 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr, 'extra' => 0 ) ) ) );
|
||||
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, 'extra' => 0 ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,10 +560,10 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 11 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'forums', 'extra' => array( '_upgradeStep' => 11 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr, 'extra' => 0 ) ) ) );
|
||||
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, 'extra' => 0 ) ) ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -586,6 +587,9 @@ ADD INDEX last_post (forum_id, pinned, last_real_post, state)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
/* Fix bbcode links for RSS feed 'full article' */
|
||||
\IPS\Db::i()->update( 'forums_rss_import', array( "rss_import_showlink" => 'View the full article' ) );
|
||||
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\forums\Topic' ), 2 );
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\forums\Topic\Post' ), 2 );
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\forums\Topic\ArchivedPost' ), 2 );
|
||||
|
||||
Reference in new issue
Block a user