Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/unacms/una
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Nov 11, 2024
2 parents e5acf97 + 225b133 commit 03830c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inc/classes/BxDolProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ public static function getDataForPage($mixedProfileId = false, $aParams = [])
'operator' => isAdmin(),
//'info' => $oProfile->getInfo(),
'confirmed' => $oAccount->isConfirmed(),
'notifications' => 0,
'cart' => 0,
'counters' => bx_srv('system', 'profile_counters', [], 'TemplServiceProfiles'),
'profiles_count' => $oAccount->getProfilesNumber(true),
'hash' => encryptUserId($iId),
'profiles_limit' => (int)getParam('sys_account_limit_profiles_number'),
Expand All @@ -198,7 +197,7 @@ public static function getDataForPage($mixedProfileId = false, $aParams = [])
$aRv['informer'] = $sRet;
}

$oPayments = BxDolPayments::getInstance();
/* $oPayments = BxDolPayments::getInstance();
if($oPayments->isActive())
$aRv['cart'] = $oPayments->getCartItemsCount();
Expand All @@ -213,7 +212,7 @@ public static function getDataForPage($mixedProfileId = false, $aParams = [])
if($oMenuProfileAdd !== false)
$aRv['menu'] = $oMenuProfileAdd->getCodeAPI();
}
}
}*/
}

bx_alert('system', 'get_profile_for_page_api', 0, 0, ['override_result' => &$aRv]);
Expand Down
10 changes: 10 additions & 0 deletions template/scripts/BxBaseServiceProfiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,16 @@ public function serviceIsEnabledCfilter()
return BxDolContentFilter::getInstance()->isEnabled();
}


public function serviceProfileCounters()
{
$oLiveUpdates = BxDolLiveUpdates::getInstance();
if($oLiveUpdates) {
$aResult = $oLiveUpdates->performApi();
return($aResult);
}
}

public function serviceUpdateSettings($iProfileId = false, $sSettings = '')
{
$oProfile = BxDolProfile::getInstance($iProfileId);
Expand Down
1 change: 1 addition & 0 deletions template/scripts/BxBaseServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public function serviceGetSafeServices()
'BrowseMembers' => 'BxBaseServiceProfiles',
'UpdateSettings' => 'BxBaseServiceProfiles',
'Befriend' => 'BxBaseServiceProfiles',
'ProfileCounters' => 'BxBaseServiceProfiles',

'GetChartGrowth' => 'BxBaseChartServices',
'GetChartStats' => 'BxBaseChartServices',
Expand Down

0 comments on commit 03830c2

Please sign in to comment.