Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -58,25 +58,28 @@ class _Upgrade
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
$toRunQueries = array(
|
||||
array(
|
||||
'table' => 'core_notifications',
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_notifications WHERE item_class='IPS\\core\\Statuses\\Status' AND item_id NOT IN (SELECT status_id FROM " . \IPS\Db::i()->prefix . "core_member_status_updates)",
|
||||
),
|
||||
array(
|
||||
'table' => 'core_notifications',
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_notifications WHERE item_class='IPS\\core\\Statuses\\Reply' AND item_id NOT IN (SELECT reply_id FROM " . \IPS\Db::i()->prefix . "core_member_status_replies)",
|
||||
)
|
||||
);
|
||||
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
if( \IPS\Db::i()->select( 'COUNT(*)', 'core_notifications' )->first() )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 3 ) ) );
|
||||
$toRunQueries = array(
|
||||
array(
|
||||
'table' => 'core_notifications',
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_notifications WHERE item_class='IPS\\core\\Statuses\\Status' AND item_id NOT IN (SELECT status_id FROM " . \IPS\Db::i()->prefix . "core_member_status_updates)",
|
||||
),
|
||||
array(
|
||||
'table' => 'core_notifications',
|
||||
'query' => "DELETE FROM " . \IPS\Db::i()->prefix . "core_notifications WHERE item_class='IPS\\core\\Statuses\\Reply' AND item_id NOT IN (SELECT reply_id FROM " . \IPS\Db::i()->prefix . "core_member_status_replies)",
|
||||
)
|
||||
);
|
||||
|
||||
/* 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 ) ) ) );
|
||||
$toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
|
||||
|
||||
if ( count( $toRun ) )
|
||||
{
|
||||
$mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( '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' => $mr ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user