Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Upgrade steps
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 3 Jun 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\setup\upg_32000;
|
||||
@@ -53,6 +52,16 @@ class _Upgrade
|
||||
\IPS\Db::i()->delete( 'cache_store', "cs_key IN( 'ccMonitor', 'portal' )" );
|
||||
\IPS\Db::i()->delete( 'core_sys_lang_words', "word_app='portal'" );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 2
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
/* We are using a raw query here to ensure the driver doesn't attempt to modify things or help us, like adjusting the table engine */
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'reputation_cache',
|
||||
@@ -77,7 +86,7 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 2 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
|
||||
/* 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 ) ) ) );
|
||||
@@ -88,11 +97,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 2
|
||||
* Step 3
|
||||
*
|
||||
* @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()
|
||||
public function step3()
|
||||
{
|
||||
if( !\IPS\Db::i()->checkForColumn( 'login_methods', 'login_custom_config' ) )
|
||||
{
|
||||
@@ -920,11 +929,20 @@ class _Upgrade
|
||||
}
|
||||
|
||||
\IPS\Db::i()->query( "UPDATE " . \IPS\Db::i()->prefix . "emoticons SET image=REPLACE(image, '.gif', '.png') WHERE emo_set='default' AND image IN ( 'angry.gif', 'biggrin.gif', 'blink.gif', 'blush.gif', 'cool.gif', 'dry.gif', 'excl.gif',
|
||||
'happy.gif', 'huh.gif', 'laugh.gif', 'mellow.gif', 'ohmy.gif', 'ph34r.gif', 'sad.gif', 'sleep.gif', 'smile.gif', 'tongue.gif', 'unsure.gif', 'wacko.gif', 'wink.gif', 'wub.gif' );" );
|
||||
'happy.gif', 'huh.gif', 'laugh.gif', 'mellow.gif', 'ohmy.gif', 'ph34r.gif', 'sad.gif', 'sleep.gif', 'smile.gif', 'tongue.gif', 'unsure.gif', 'wacko.gif', 'wink.gif', 'wub.gif' );" );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 4
|
||||
*
|
||||
* @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 step4()
|
||||
{
|
||||
/* Fix likes */
|
||||
$addLikeNotifySent = '';
|
||||
$addLikeNotifyVisible = '';
|
||||
if( !\IPS\Db::i()->checkForColumn( 'core_like', 'like_notify_sent' ) )
|
||||
{
|
||||
$addLikeNotifySent = "ADD COLUMN like_notify_sent INT(10) NOT NULL DEFAULT 0,";
|
||||
@@ -959,7 +977,7 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 5 ) ) );
|
||||
|
||||
/* 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 ) ) ) );
|
||||
@@ -969,11 +987,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 3
|
||||
* Step 5
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step3()
|
||||
public function step5()
|
||||
{
|
||||
\IPS\Db::i()->dropTable( 'email_logs' );
|
||||
|
||||
@@ -1040,11 +1058,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 4
|
||||
* Step 6
|
||||
*
|
||||
* @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 step4()
|
||||
public function step6()
|
||||
{
|
||||
\IPS\Db::i()->addColumn( 'member_status_updates', array(
|
||||
'name' => 'status_author_id',
|
||||
@@ -1054,6 +1072,7 @@ class _Upgrade
|
||||
'allow_null' => false,
|
||||
'default' => 0
|
||||
) );
|
||||
|
||||
\IPS\Db::i()->addColumn( 'member_status_updates', array(
|
||||
'name' => 'status_author_ip',
|
||||
'type' => 'varchar',
|
||||
@@ -1082,13 +1101,23 @@ class _Upgrade
|
||||
\IPS\Db::i()->update( 'member_status_updates', "status_author_id=status_member_id" );
|
||||
|
||||
\IPS\Db::i()->query( "INSERT INTO " . \IPS\Db::i()->prefix . "member_status_updates (status_member_id, status_author_id, status_date, status_content, status_replies, status_last_ids, status_is_latest, status_is_locked, status_hash, status_imported, status_creator, status_author_ip, status_approved)
|
||||
SELECT comment_for_member_id, comment_by_member_id, comment_date, comment_content, 0, '', 0, 0, MD5(comment_content), 0, '', comment_ip_address, comment_approved FROM " . \IPS\Db::i()->prefix . "profile_comments" );
|
||||
SELECT comment_for_member_id, comment_by_member_id, comment_date, comment_content, 0, '', 0, 0, MD5(comment_content), 0, '', comment_ip_address, comment_approved FROM " . \IPS\Db::i()->prefix . "profile_comments" );
|
||||
|
||||
\IPS\Db::i()->dropTable( 'profile_comments' );
|
||||
|
||||
require \IPS\ROOT_PATH . '/conf_global.php';
|
||||
\IPS\Db::i()->update( 'groups', array( 'g_view_board' => 1 ), array( 'g_id=?', $INFO['guest_group'] ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 7
|
||||
*
|
||||
* @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 step7()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'message_posts',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "message_posts CHANGE COLUMN msg_ip_address msg_ip_address VARCHAR(46) NOT NULL DEFAULT '';"
|
||||
@@ -1096,7 +1125,7 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 5 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', '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' => \IPS\Request::i()->mr ) ) ) );
|
||||
@@ -1106,11 +1135,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 5
|
||||
* Step 8
|
||||
*
|
||||
* @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 step5()
|
||||
public function step8()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'members',
|
||||
@@ -1136,7 +1165,7 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 6 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 9 ) ) );
|
||||
|
||||
/* 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 ) ) ) );
|
||||
@@ -1146,11 +1175,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 6
|
||||
* Step 9
|
||||
*
|
||||
* @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 step6()
|
||||
public function step9()
|
||||
{
|
||||
\IPS\Db::i()->query( "INSERT IGNORE INTO " . \IPS\Db::i()->prefix . "core_like
|
||||
(like_id, like_lookup_id, like_lookup_area, like_app, like_area, like_rel_id, like_member_id, like_is_anon, like_added, like_notify_do, like_notify_freq, like_notify_sent, like_visible)
|
||||
@@ -1165,6 +1194,16 @@ class _Upgrade
|
||||
\IPS\Db::i()->dropTable( "forum_tracker" );
|
||||
\IPS\Db::i()->dropTable( "tracker" );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 10
|
||||
*
|
||||
* @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 step10()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'topics',
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "topics ADD COLUMN tdelete_time INT(10) NOT NULL DEFAULT 0,
|
||||
@@ -1177,7 +1216,7 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 7 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', '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' => \IPS\Request::i()->mr ) ) ) );
|
||||
@@ -1187,11 +1226,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 7
|
||||
* Step 11
|
||||
*
|
||||
* @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 step7()
|
||||
public function step11()
|
||||
{
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
|
||||
'table' => 'posts',
|
||||
@@ -1210,21 +1249,21 @@ class _Upgrade
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 8 ) ) );
|
||||
\IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 1 => 'core', 'extra' => array( '_upgradeStep' => 12 ) ) );
|
||||
|
||||
/* Queries to run manually */
|
||||
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 ) ) ) );
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 8
|
||||
* Step 12
|
||||
*
|
||||
* @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 step8()
|
||||
public function step12()
|
||||
{
|
||||
\IPS\Db::i()->addIndex( 'warn_logs', array(
|
||||
'type' => 'key',
|
||||
@@ -1236,11 +1275,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 9
|
||||
* Step 13
|
||||
*
|
||||
* @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 step9()
|
||||
public function step13()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'admin_login_logs', 'admin_ip_address', array(
|
||||
'name' => 'admin_ip_address',
|
||||
@@ -1254,11 +1293,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 10
|
||||
* Step 14
|
||||
*
|
||||
* @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 step10()
|
||||
public function step14()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'admin_logs', 'ip_address', array(
|
||||
'name' => 'ip_address',
|
||||
@@ -1272,11 +1311,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 11
|
||||
* Step 15
|
||||
*
|
||||
* @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 step11()
|
||||
public function step15()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'dnames_change', 'dname_ip_address', array(
|
||||
'name' => 'dname_ip_address',
|
||||
@@ -1289,11 +1328,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 12
|
||||
* Step 16
|
||||
*
|
||||
* @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 step12()
|
||||
public function step16()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'error_logs', 'log_ip_address', array(
|
||||
'name' => 'log_ip_address',
|
||||
@@ -1314,11 +1353,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 13
|
||||
* Step 17
|
||||
*
|
||||
* @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 step13()
|
||||
public function step17()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'moderator_logs', 'ip_address', array(
|
||||
'name' => 'ip_address',
|
||||
@@ -1338,11 +1377,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 14
|
||||
* Step 18
|
||||
*
|
||||
* @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 step14()
|
||||
public function step18()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'spam_service_log', 'ip_address', array(
|
||||
'name' => 'ip_address',
|
||||
@@ -1355,11 +1394,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 15
|
||||
* Step 19
|
||||
*
|
||||
* @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 step15()
|
||||
public function step19()
|
||||
{
|
||||
\IPS\Db::i()->changeColumn( 'task_logs', 'log_ip', array(
|
||||
'name' => 'log_ip',
|
||||
@@ -1373,11 +1412,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 16
|
||||
* Step 20
|
||||
*
|
||||
* @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 step16()
|
||||
public function step20()
|
||||
{
|
||||
/* Update array for archive forums */
|
||||
$_update = array(
|
||||
@@ -1399,11 +1438,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 17
|
||||
* Step 21
|
||||
*
|
||||
* @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 step17()
|
||||
public function step21()
|
||||
{
|
||||
/* Check for existing login method config files (in the old location) and import config files if needed */
|
||||
try
|
||||
@@ -1437,11 +1476,11 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 18
|
||||
* Step 22
|
||||
*
|
||||
* @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 step18()
|
||||
public function step22()
|
||||
{
|
||||
/* @note Steps we skipped that previously used to run:
|
||||
-- Uninstalling old hooks (this is done in the 4.0 step already)
|
||||
|
||||
Reference in new issue
Block a user