Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -180,18 +180,23 @@ class _Recognize extends \IPS\Patterns\ActiveRecord
|
||||
try
|
||||
{
|
||||
$author = \IPS\Member::load( $this->member_id );
|
||||
|
||||
if ( $this->points )
|
||||
{
|
||||
/* Wade does it this way so I guess there's a reason. And let the reason be love */
|
||||
\IPS\Db::i()->update( 'core_members', "achievements_points = achievements_points - " . \intval( $this->points ), [ 'member_id=?', $this->member_id ] );
|
||||
\IPS\Db::i()->delete( 'core_points_log', [ 'recognize=?', $this->id ] );
|
||||
}
|
||||
|
||||
if ( $this->badge )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_member_badges', [ 'member_id=? and recognize_id=?', $this->member_id, $this->id ] );
|
||||
\IPS\Db::i()->delete( 'core_member_badges', [ 'member=? and recognize=?', $this->member_id, $this->id ] );
|
||||
}
|
||||
|
||||
/* Remove notifications */
|
||||
\IPS\Db::i()->delete( 'core_notifications', array( 'item_class=? and notification_key=? and item_id=? and extra=?', 'IPS\Member', 'new_recognize', $this->member_id, '[' . $this->id . ']' ) );
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
catch( \Exception $e ) {}
|
||||
|
||||
parent::delete();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user