Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -30,10 +30,13 @@ class _Upgrade
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$prefix = \IPS\Db::i()->prefix;
|
||||
$query = "DELETE {$prefix}core_notifications.* FROM {$prefix}core_notifications LEFT JOIN {$prefix}core_member_status_replies ON({$prefix}core_member_status_replies.reply_id={$prefix}core_notifications.item_id AND {$prefix}core_notifications.item_class='IPS\\core\\Statuses\\Reply') WHERE {$prefix}core_notifications.notification_key='profile_reply' and {$prefix}core_member_status_replies.reply_id IS NULL";
|
||||
if( \IPS\Db::i()->select( 'COUNT(*)', 'core_notifications' )->first() )
|
||||
{
|
||||
$prefix = \IPS\Db::i()->prefix;
|
||||
$query = "DELETE {$prefix}core_notifications.* FROM {$prefix}core_notifications LEFT JOIN {$prefix}core_member_status_replies ON({$prefix}core_member_status_replies.reply_id={$prefix}core_notifications.item_id AND {$prefix}core_notifications.item_class='IPS\\core\\Statuses\\Reply') WHERE {$prefix}core_notifications.notification_key='profile_reply' and {$prefix}core_member_status_replies.reply_id IS NULL";
|
||||
|
||||
\IPS\Db::i()->query( $query );
|
||||
\IPS\Db::i()->query( $query );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user