* [ADDED] Smarty acl_check function * [ADDED] Optional default return value for getValue calls * [UPDATE] ACL Checks in page controllers * [UPDATE] Navigation template to use check_acl from Smarty * [ADDED] New ACL options where needed * [REMOVED] Disable pages from System Settings Tab * [ADDED] Above removed pages into ACL Settings Tab This will make usage of ACLs a bit easier and transparent. Also fixes #1731 once merged.
19 lines
884 B
PHP
19 lines
884 B
PHP
<?php
|
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
|
|
|
if ($setting->getValue('acl_contactform') == 2) {
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
|
$smarty->assign("CONTENT", "empty");
|
|
} else if ($setting->getValue('acl_contactform') == 0 && !$user->isAuthenticated(false)) {
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is disabled for guests.', 'TYPE' => 'errormsg');
|
|
$smarty->assign("CONTENT", "disabled.tpl");
|
|
} else {
|
|
if ($setting->getValue('recaptcha_enabled') && $setting->getValue('recaptcha_enabled_contactform')) {
|
|
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
|
$smarty->assign("RECAPTCHA", recaptcha_get_html($setting->getValue('recaptcha_public_key')));
|
|
}
|
|
// Tempalte specifics
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
}
|
|
?>
|