|
|
@@ -90,20 +90,24 @@ class BxDolPush extends BxDolFactory implements iBxDolSingleton
|
|
|
$GLOBALS['logged']['member'] = $oProfile ? true : false;
|
|
|
}
|
|
|
|
|
|
- if ($iProfileId && $iProfileId != bx_get_logged_profile_id())
|
|
|
- unset($GLOBALS['bxDolClasses']['BxDolMenu!sys_account_notifications']);
|
|
|
- $oMenu = BxDolMenu::getObjectInstance('sys_account_notifications'); // sys_toolbar_member
|
|
|
- if ($iProfileId && $iProfileId != bx_get_logged_profile_id())
|
|
|
- unset($GLOBALS['bxDolClasses']['BxDolMenu!sys_account_notifications']);
|
|
|
-
|
|
|
- $a = $oMenu->getMenuItems();
|
|
|
- $iBubbles = 0;
|
|
|
- foreach ($a as $r) {
|
|
|
- if (!$r['bx_if:addon']['condition'])
|
|
|
- continue;
|
|
|
- if (null !== $aBubbles)
|
|
|
- $aBubbles[$r['name']] = $r['bx_if:addon']['content']['addon'];
|
|
|
- $iBubbles += $r['bx_if:addon']['content']['addon'];
|
|
|
+ $aMenusObjects = array('sys_account_notifications', 'sys_toolbar_member');
|
|
|
+ foreach ($aMenusObjects as $sMenuObject) {
|
|
|
+ if ($iProfileId && $iProfileId != bx_get_logged_profile_id())
|
|
|
+ unset($GLOBALS['bxDolClasses']['BxDolMenu!sys_account_notifications']);
|
|
|
+ $oMenu = BxDolMenu::getObjectInstance($sMenuObject);
|
|
|
+ if ($iProfileId && $iProfileId != bx_get_logged_profile_id())
|
|
|
+ unset($GLOBALS['bxDolClasses']['BxDolMenu!sys_account_notifications']);
|
|
|
+
|
|
|
+ $bSave = $oMenu->setDisplayAddons(true);
|
|
|
+ $a = $oMenu->getMenuItems();
|
|
|
+ $iBubbles = 0;
|
|
|
+ foreach ($a as $r) {
|
|
|
+ if (!$r['bx_if:addon']['condition'])
|
|
|
+ continue;
|
|
|
+ if (null !== $aBubbles)
|
|
|
+ $aBubbles[$r['name']] = $r['bx_if:addon']['content']['addon'];
|
|
|
+ $iBubbles += $r['bx_if:addon']['content']['addon'];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ($iProfileId && $iProfileId != bx_get_logged_profile_id()) {
|