AntonLV 8 лет назад
Родитель
Сommit
095d530901

+ 13 - 0
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -720,6 +720,19 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
         return $a;
     }
 
+    public function serviceGetNotificationsVote($aEvent)
+    {
+        $aResult = parent::serviceGetNotificationsVote($aEvent);
+        if(empty($aResult) || !is_array($aResult) || !$this->serviceActAsProfile())
+            return $aResult;
+
+        $oProfile = BxDolProfile::getInstanceByContentAndType((int)$aEvent['object_id'], $this->_oConfig->getName());
+        if($oProfile !== false)
+            $aResult['entry_author'] = $oProfile->id();
+
+        return $aResult;
+    }
+
     /**
      * Notification about new member requst in the group
      */

+ 2 - 4
modules/base/profile/classes/BxBaseModProfilePrivacy.php

@@ -11,7 +11,7 @@
 
 class BxBaseModProfilePrivacy extends BxTemplPrivacy
 {
-	protected $MODULE;
+    protected $MODULE;
     protected $_oModule;
 
     protected $_aPrivacyParticallyVisible = array ();
@@ -20,9 +20,7 @@ class BxBaseModProfilePrivacy extends BxTemplPrivacy
     {
         parent::__construct($aOptions, $oTemplate);
 
-    	$this->_oModule = BxDolModule::getInstance($this->MODULE);
-    	if(!$oTemplate)
-			$oTemplate = $this->_oModule->_oTemplate;
+        $this->_oModule = BxDolModule::getInstance($this->MODULE);
 
         $this->_aPrivacyParticallyVisible = array(BX_DOL_PG_FRIENDS);
     }