Преглед на файлове

#4558 - Build-in API support (fix counters)

romanlesnikov преди 1 година
родител
ревизия
09f9399ff3
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      inc/classes/BxDolProfile.php

+ 2 - 1
inc/classes/BxDolProfile.php

@@ -182,7 +182,6 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
             'operator' => isAdmin(),
             //'info' => $oProfile->getInfo(),
             'confirmed' => $oAccount->isConfirmed(),
-            'counters' => bx_srv('system', 'profile_counters', [], 'TemplServiceProfiles'),
             'profiles_count' => $oAccount->getProfilesNumber(true),
             'hash' => encryptUserId($iId),
             'profiles_limit' => (int)getParam('sys_account_limit_profiles_number'),
@@ -191,6 +190,8 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         ];
         
         if ($iId == bx_get_logged_profile_id()){
+            $aRv['counters'] = bx_srv('system', 'profile_counters', [], 'TemplServiceProfiles');
+            
             $oInformer = BxDolInformer::getInstance(BxDolTemplate::getInstance());
             $sRet = $oInformer ? $oInformer->display() : '';
             if ($sRet){