diff --git a/include/pages/account/earnings.inc.php b/include/pages/account/earnings.inc.php index c4fe7015..51453b5a 100644 --- a/include/pages/account/earnings.inc.php +++ b/include/pages/account/earnings.inc.php @@ -2,20 +2,22 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; // Check user authentication status -if ($user->isAuthenticated()) { +if ($user->isAuthenticated() AND !$setting->getValue('disable_transactionsummary')) { if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $iLimit = 30; $debug->append('No cached version available, fetching from backend', 3); - if (!$setting->getValue('disable_transactionsummary')) { - $aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']); - $aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']); - $smarty->assign('SUMMARY', $aTransactionSummary); - $smarty->assign('BYTIME', $aTransactionSummaryByTime); - } + $aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']); + $aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']); + $smarty->assign('SUMMARY', $aTransactionSummary); + $smarty->assign('BYTIME', $aTransactionSummaryByTime); } else { $debug->append('Using cached page', 3); } + $smarty->assign('CONTENT', 'default.tpl'); +} else if (!$setting->getValue('disable_transactionsummary')) { + $smarty->assign('CONTENT', 'disabled.tpl'); +} else { + $smarty->assign('CONTENT', 'disabled.tpl'); } -$smarty->assign('CONTENT', 'default.tpl'); ?> diff --git a/include/smarty_globals.inc.php b/include/smarty_globals.inc.php index de1fce44..b94b661d 100644 --- a/include/smarty_globals.inc.php +++ b/include/smarty_globals.inc.php @@ -79,6 +79,7 @@ $aGlobal = array( 'disable_contactform' => $setting->getValue('disable_contactform'), 'disable_contactform_guest' => $setting->getValue('disable_contactform_guest'), 'disable_worker_edit' => $setting->getValue('disable_worker_edit'), + 'disable_transactionsummary' => $setting->getValue('disable_transactionsummary'), 'algorithm' => $config['algorithm'], 'getbalancewithunconfirmed' => $config['getbalancewithunconfirmed'], 'target_bits' => $coin->getTargetBits(), diff --git a/templates/bootstrap/account/earnings/disabled.tpl b/templates/bootstrap/account/earnings/disabled.tpl new file mode 100755 index 00000000..e69de29b diff --git a/templates/bootstrap/global/navigation.tpl b/templates/bootstrap/global/navigation.tpl index 8d3ae1db..a2f0dd41 100644 --- a/templates/bootstrap/global/navigation.tpl +++ b/templates/bootstrap/global/navigation.tpl @@ -15,7 +15,7 @@
  • Edit Account
  • My Workers
  • Transactions
  • -
  • Earnings
  • + {if !$GLOBAL.config.disable_transactionsummary}
  • Earnings
  • {/if} {if !$GLOBAL.config.disable_notifications}
  • Notifications
  • {/if} {if !$GLOBAL.config.disable_invitations}
  • Invitations
  • {/if} {if !$GLOBAL.acl.qrcode}
  • QR Codes
  • {/if}