AntonLV 9 лет назад
Родитель
Сommit
266724902c

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

@@ -102,6 +102,24 @@ class BxNtfsResponse extends BxBaseModNotificationsResponse
         );
     }
 
+    protected function getDeleteDataBxTimelineDelete(&$oAlert, &$aHandler)
+    {
+        $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
+
+    	return array(
+    	    array(
+            	'type' => $oAlert->sUnit, 
+            	'action' => $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'], 
+            	'object_id' => $oAlert->iObject,
+            	'subobject_id' => $this->_getSubObjectId($oAlert->aExtras)
+            ),
+            array(
+            	'action' => 'timeline_post_common', 
+            	'subobject_id' => $oAlert->iObject
+            )
+        );
+    }
+
 	/**
      * Custom insert data getter for sys_profiles_friends -> connection_added and connection_removed alerts. 
      */

+ 5 - 1
template/scripts/BxBaseMenuAccountPopup.php

@@ -22,8 +22,12 @@ class BxBaseMenuAccountPopup extends BxTemplMenu
     {
         $aVars = parent::_getTemplateVars ();
 
+        $oProfile = BxDolProfile::getInstance();
+        if(!$oProfile)
+            return $aVars;
+
         $aVars['bx_repeat:menu_items'] = array(true);
-        $aVars['active_profile'] = BxDolProfile::getInstance()->getUnit();
+        $aVars['active_profile'] = $oProfile->getUnit();
         $aVars['menu_notifications'] = BxDolMenu::getObjectInstance('sys_account_notifications')->getCode();
         $aVars['bx_if:multiple_profiles_mode'] = array(
             'condition' => 1 != (int)getParam('sys_account_limit_profiles_number'),