Просмотр исходного кода

Merge branch 'master' of https://github.com/unaio/una

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

+ 5 - 0
inc/classes/BxDolModuleProxy.php

@@ -52,6 +52,11 @@ class BxDolModuleProxy
         }
     }
 
+    public function isMethodExists($s)
+    {
+        return method_exists($this->_oProxifiedObject, $s);
+    }
+
     /**
      * Dirty fix for pass by reference to BxTimelineTemplate::getData
      */

+ 5 - 0
inc/classes/BxDolModuleTemplate.php

@@ -155,6 +155,11 @@ class BxDolModuleTemplate extends BxDolTemplate
     public function addCssJs()
     {
     }
+
+    public function isMethodExists($s)
+    {
+        return method_exists($this->_oProxifiedObject, $s);
+    }    
 }
 
 /** @} */

+ 6 - 0
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -1315,6 +1315,12 @@ class BxBaseModGeneralModule extends BxDolModule
         if(!BxDolAcl::getInstance()->isMemberLevelInSet($aItem['visible_for_levels']))
             return false;
 
+        if (!empty($aItem['visibility_custom'])) {
+            $oMenu = BxDolMenu::getObjectInstance($sObject);
+            if ($oMenu && !BxDolService::callSerialized($aItem['visibility_custom'], $this->_aMarkers))
+                return false;
+        }
+        
         // get custom function name to check menu item visibility
         $sFuncCheckAccess = false;
         if(isset($CNF['MENU_ITEM_TO_METHOD'][$sObject][$aItem['name']]))

+ 1 - 1
modules/boonex/notifications/classes/BxNtfsResponse.php

@@ -237,7 +237,7 @@ class BxNtfsResponse extends BxBaseModNotificationsResponse
             $sMethodPostfix = bx_gen_method_name($sDeliveryType);
             $sMethodGet = 'getNotification' . $sMethodPostfix;
             $sMethodSend = 'sendNotification' . $sMethodPostfix;
-            if(!method_exists($this->_oModule->_oTemplate, $sMethodGet) || !method_exists($this, $sMethodSend))
+            if(!$this->_oModule->_oTemplate->isMethodExists($sMethodGet) || !method_exists($this, $sMethodSend))
                 continue;
 
             $mixedContent = $this->_oModule->_oTemplate->$sMethodGet($aEvent);

+ 1 - 1
modules/boonex/payment/classes/BxPaymentSubscriptions.php

@@ -180,7 +180,7 @@ class BxPaymentSubscriptions extends BxBaseModPaymentSubscriptions
         $CNF = &$this->_oModule->_oConfig->CNF;
 
         $sMethod = 'displayBlockSbs' . bx_gen_method_name($sType);
-        if(!method_exists($this->_oModule->_oTemplate, $sMethod))
+        if(!$this->_oModule->_oTemplate->isMethodExists($sMethod))
             return array(
         		'content' => MsgBox(_t('_Empty'))
             );

+ 13 - 0
modules/boonex/russian/data/langs/bx_anon_follow/ru.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string name="_bx_anon_follow"><![CDATA[Получать уведомления анонимно]]></string>
+	<string name="_bx_anon_follow_page_block_title_sys_anon_follow"><![CDATA[Подписчики]]></string>
+	<string name="_bx_anon_follow_page_block_title_anon_follow"><![CDATA[Подписчики]]></string>
+	<string name="_bx_anon_follow_menu_item_title_system_follow"><![CDATA[Получать уведомления анонимно]]></string>
+	<string name="_bx_anon_follow_menu_item_title_follow"><![CDATA[Получать уведомления анонимно]]></string>
+	<string name="_bx_anon_follow_persons_fields"><![CDATA[Поля людей]]></string>
+	<string name="_bx_anon_follow_orgs_fields"><![CDATA[Поля организаций]]></string>
+	<string name="_bx_anon_follow_fields_separator"><![CDATA[Разделитель полей]]></string>
+	<string name="_bx_anon_follow_txt_button"><![CDATA[Получать уведомления анонимно]]></string>
+	<string name="_bx_anon_follow_txt_grid_title_default"><![CDATA[Получать уведомления анонимно]]></string>
+</resources>