Selaa lähdekoodia

Ticket #4546 - Add subtypes for Module type in sys_modules table.

AntonLV 2 vuotta sitten
vanhempi
sitoutus
2426a68cdf

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

@@ -3202,7 +3202,6 @@ class BxBaseModGeneralModule extends BxDolModule
             'icon' => $oProfile->getIcon(),
             'thumb' => $oProfile->getThumb(),
             'avatar' => $oProfile->getAvatar(),
-            'unit' => $oProfile->{'getUnit' . ($this->_bIsApi ? 'API' : '')}(),
             'active' => $oProfile->isActive(),
         );
     }

+ 8 - 3
modules/boonex/acl/classes/BxAclConfig.php

@@ -84,9 +84,8 @@ class BxAclConfig extends BxBaseModGeneralConfig
             'popup_price' => $sHtmlPrefix . '-popup-price'
         );
 
-        $oPayments = BxDolPayments::getInstance();
-        $this->_iOwner = (int)$oPayments->getOption('site_admin');
-        $this->_aCurrency = $oPayments->getCurrencyInfo($this->_iOwner);
+        $this->_iOwner = 0;
+        $this->_aCurrency = [];
 
         $this->_bExpireNotifyOnce = true;
         $this->_iExpireNotificationDays = 1;
@@ -129,11 +128,17 @@ class BxAclConfig extends BxBaseModGeneralConfig
 
     public function getOwner()
     {
+        if(empty($this->_iOwner))
+            $this->_iOwner = (int)BxDolPayments::getInstance()->getOption('site_admin');
+
     	return $this->_iOwner;
     }
 
     public function getCurrency()
     {
+        if(empty($this->_aCurrency) || !is_array($this->_aCurrency))
+            $this->_aCurrency = BxDolPayments::getInstance()->getCurrencyInfo($this->getOwner());
+
     	return $this->_aCurrency;
     }