[CLEANUP] More code cleanup for last notifications
This commit is contained in:
parent
6a5376eaec
commit
34079926e0
@ -56,7 +56,6 @@ $aGlobal = array(
|
||||
'hashrate' => $iCurrentPoolHashrate,
|
||||
'nethashrate' => $dNetworkHashrate,
|
||||
'sharerate' => $iCurrentPoolShareRate,
|
||||
'lastnotifications' => $iLastNotifications,
|
||||
'workers' => $iCurrentActiveWorkers,
|
||||
'roundshares' => $aRoundShares,
|
||||
'fees' => $config['fees'],
|
||||
@ -130,7 +129,8 @@ $aGlobal['acl']['chat']['page'] = $setting->getValue('acl_chat_page', 2);
|
||||
// We don't want these session infos cached
|
||||
if (@$_SESSION['USERDATA']['id']) {
|
||||
// Fetch Last 5 notifications
|
||||
$iLastNotifications = $notification->getNofifications($_SESSION['USERDATA']['id'], 5);
|
||||
$aLastNotifications = $notification->getNofifications($_SESSION['USERDATA']['id'], 5);
|
||||
$aGlobal['userdata']['lastnotifications'] = $aLastNotifications;
|
||||
|
||||
$aGlobal['userdata'] = $_SESSION['USERDATA']['id'] ? $user->getUserData($_SESSION['USERDATA']['id']) : array();
|
||||
$aGlobal['userdata']['balance'] = $transaction->getBalance($_SESSION['USERDATA']['id']);
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<!-- /.navbar-header -->
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{if $smarty.session.AUTHENTICATED|default:"0" == 1 && $GLOBAL.lastnotifications|@count != 0}
|
||||
{if $smarty.session.AUTHENTICATED|default:"0" == 1 && $GLOBAL.userdata.lastnotifications|@count|default:"0" != 0}
|
||||
<!-- /.dropdown -->
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
@ -20,7 +20,7 @@
|
||||
<ul class="dropdown-menu dropdown-alerts">
|
||||
|
||||
|
||||
{section notification $GLOBAL.lastnotifications}
|
||||
{section notification $GLOBAL.userdata.lastnotifications}
|
||||
<li>
|
||||
<a href="#">
|
||||
<div>
|
||||
@ -74,4 +74,4 @@
|
||||
<!-- /.navbar-top-links -->
|
||||
|
||||
</nav>
|
||||
<!-- /.navbar-static-top -->
|
||||
<!-- /.navbar-static-top -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user