AntonLV 9 ani în urmă
părinte
comite
6a56c0fa9c

+ 18 - 2
inc/classes/BxDolConnection.php

@@ -644,7 +644,15 @@ class BxDolConnection extends BxDolFactory implements iBxDolFactoryObject
      */
     public function onDeleteInitiator ($iIdInitiator)
     {
-        return $this->_oQuery->onDelete ($iIdInitiator, 'initiator');
+        if(!$this->_oQuery->onDelete ($iIdInitiator, 'initiator'))
+            return false;
+
+        bx_alert($this->_sObject, 'connection_removed_all', 0, bx_get_logged_profile_id(), array(
+            'initiator' => (int)$iIdInitiator,
+            'object' => $this,
+        ));
+
+        return true;
     }
 
     /**
@@ -654,7 +662,15 @@ class BxDolConnection extends BxDolFactory implements iBxDolFactoryObject
      */
     public function onDeleteContent ($iIdContent)
     {
-        return $this->_oQuery->onDelete ($iIdContent, 'content');
+        if(!$this->_oQuery->onDelete ($iIdContent, 'content'))
+            return false;
+
+        bx_alert($this->_sObject, 'connection_removed_all', 0, bx_get_logged_profile_id(), array(
+            'content' => (int)$iIdContent,
+            'object' => $this,
+        ));
+
+        return true;
     }
 
 

+ 2 - 0
modules/boonex/notifications/classes/BxNtfsResponse.php

@@ -51,6 +51,8 @@ class BxNtfsResponse extends BxBaseModNotificationsResponse
             case BX_BASE_MOD_NTFS_HANDLER_TYPE_DELETE:
         		if($oAlert->sUnit == 'profile' && $oAlert->sAction == 'delete') {
         			$this->_oModule->_oDb->deleteEvent(array('owner_id' => $oAlert->iObject));
+
+        			$this->_oModule->_oDb->deleteEvent(array('action' => 'connection_added', 'object_id' => $oAlert->iObject));
 					break;
             	}