AntonLV 12 роки тому
батько
коміт
72e2607123

+ 14 - 0
modules/base/general/classes/BxBaseModGeneralConfig.php

@@ -15,6 +15,7 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
 {
     public $CNF;
 
+    protected $_aPrefixes;
     protected $_aJsClass;
     protected $_aJsObjects;
     protected $_aGridObjects;
@@ -22,6 +23,19 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
     function __construct($aModule)
     {
         parent::__construct($aModule);
+
+        $this->_aPrefixes = array();
+        $this->_aJsClass = array();
+        $this->_aJsObjects = array();
+        $this->_aGridObjects = array();
+    }
+
+	public function getPrefix($sType = '')
+    {
+    	if(empty($sType))
+            return $this->_aPrefixes;
+
+        return isset($this->_aPrefixes[$sType]) ? $this->_aPrefixes[$sType] : '';
     }
 
 	public function getJsClass($sType)

+ 2 - 2
modules/base/general/classes/BxBaseModGeneralGridAdministration.php

@@ -34,8 +34,8 @@ class BxBaseModGeneralGridAdministration extends BxTemplGrid
         if(empty($sFilterName) || empty($aFilterValues))
             return '';
 
-		$sName = $this->_oModule->_oConfig->getName();
 		$sJsObject = $this->_oModule->_oConfig->getJsObject('manage_tools');
+		$sPrefixLang = $this->_oModule->_oConfig->getPrefix('lang');
 
 		$sFilterField = '_s' . str_replace(' ', '', ucwords(str_replace('_', ' ', $sFilterName)));
 		foreach($aFilterValues as $sKey => $sValue)
@@ -49,7 +49,7 @@ class BxBaseModGeneralGridAdministration extends BxTemplGrid
                 'onChange' => 'javascript:' . $sJsObject . '.onChangeFilter(this)'
             ),
             'value' => $this->$sFilterField,
-            'values' => array_merge(array('' => _t('_' . $sName . '_grid_filter_item_title_adm_select_one')), $aFilterValues)
+            'values' => array_merge(array('' => _t($sPrefixLang . '_grid_filter_item_title_adm_select_one')), $aFilterValues)
         );
 
         bx_import('BxTemplFormView');

+ 0 - 22
modules/base/notifications/classes/BxBaseModNotificationsConfig.php

@@ -15,7 +15,6 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
 {
 	protected $_oDb;
 
-    protected $_aPrefixes;
     protected $_aObjects;
 
 	protected $_aHandlerDescriptor;
@@ -23,9 +22,6 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
     protected $_aHandlers;
     protected $_aHandlersHidden;
 
-    protected $_aJsClass;
-    protected $_aJsObjects;
-
     protected $_aPerPage;
     protected $_aHtmlIds;
 	
@@ -82,14 +78,6 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
             $this->_aHandlersHidden = explode(',', $sHideTimeline);
     }
 
-    public function getPrefix($sType = '')
-    {
-    	if(empty($sType))
-            return $this->_aPrefixes;
-
-        return isset($this->_aPrefixes[$sType]) ? $this->_aPrefixes[$sType] : '';
-    }
-
     public function getObject($sType = '')
     {
     	if(empty($sType))
@@ -125,16 +113,6 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
         return $this->_aHandlersHidden;
     }
 
-	public function getJsClass($sType)
-    {
-        return isset($this->_aJsClass[$sType]) ? $this->_aJsClass[$sType] : '';
-    }
-
-    public function getJsObject($sType)
-    {
-        return isset($this->_aJsObjects[$sType]) ? $this->_aJsObjects[$sType] : '';
-    }
-
 	public function getPerPage($sType = 'default')
     {
     	if(empty($sType))