diff --git a/public/include/config/admin_settings.inc.php b/public/include/config/admin_settings.inc.php index fbc396b6..48a5a0d6 100644 --- a/public/include/config/admin_settings.inc.php +++ b/public/include/config/admin_settings.inc.php @@ -279,6 +279,13 @@ $aSettings['acl'][] = array( 'name' => 'acl_moot_forum', 'value' => $setting->getValue('acl_moot_forum'), 'tooltip' => 'Make the forum page private (users only) or public.' ); +$aSettings['acl'][] = array( + 'display' => 'QRCode', 'type' => 'select', + 'options' => array( 0 => 'Enabled', 1 => 'Disabled' ), + 'default' => 0, + 'name' => 'acl_qrcode', 'value' => $setting->getValue('acl_qrcode'), + 'tooltip' => 'Hide or Show the QRCode Page.' +); $aSettings['system'][] = array( 'display' => 'E-mail address for system error notifications', 'type' => 'text', 'size' => 25, diff --git a/public/include/pages/account/qrcode.inc.php b/public/include/pages/account/qrcode.inc.php index 3171ded7..6e30b898 100644 --- a/public/include/pages/account/qrcode.inc.php +++ b/public/include/pages/account/qrcode.inc.php @@ -1,5 +1,15 @@ isAuthenticated()) $smarty->assign("CONTENT", "default.tpl"); +switch($setting->getValue('acl_qrcode')) { +case '0': + if ($user->isAuthenticated()) { + $smarty->assign("CONTENT", "default.tpl"); + } + break; +case '1': + $_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'alert alert-danger'); + $smarty->assign("CONTENT", ""); + break; +} ?> diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 0365ee32..d19fd00b 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -134,6 +134,7 @@ $aGlobal['acl']['about']['page'] = $setting->getValue('acl_about_page'); $aGlobal['acl']['contactform'] = $setting->getValue('acl_contactform'); $aGlobal['acl']['chat']['page'] = $setting->getValue('acl_chat_page', 2); $aGlobal['acl']['moot']['forum'] = $setting->getValue('acl_moot_forum', 2); +$aGlobal['acl']['qrcode'] = $setting->getValue('acl_qrcode'); // We don't want these session infos cached if (@$_SESSION['USERDATA']['id']) { diff --git a/public/templates/bootstrap/account/qrcode/disabled.tpl b/public/templates/bootstrap/account/qrcode/disabled.tpl new file mode 100755 index 00000000..e69de29b diff --git a/public/templates/bootstrap/global/navigation.tpl b/public/templates/bootstrap/global/navigation.tpl index d7ec51be..e360a61c 100644 --- a/public/templates/bootstrap/global/navigation.tpl +++ b/public/templates/bootstrap/global/navigation.tpl @@ -18,7 +18,7 @@