From e3776c06c37cc197709dac60892604dfea894ac2 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 29 Nov 2010 01:34:36 +0100 Subject: Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3 As of VIM 7.3 it is no longer possible to specify the encoding in the modeline. This gives an error message whenever such a file is opened, thus this commit removes the enc setting from the modeline. --- inc/confutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/confutils.php') diff --git a/inc/confutils.php b/inc/confutils.php index 4306dab8f..26ed4f087 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -324,4 +324,4 @@ function conf_decodeString($str) { return $str; } } -//Setup VIM: ex: et ts=4 enc=utf-8 : +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 3a48618a538412994ec244d5a9fde5c4a6161d10 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 22 Feb 2011 23:04:53 +0000 Subject: improved actionOK and its use --- inc/confutils.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'inc/confutils.php') diff --git a/inc/confutils.php b/inc/confutils.php index 26ed4f087..b2d25fb65 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,17 +241,24 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(isset($conf['openregister']) && !$conf['openregister']) $disabled[] = 'register'; - if(isset($conf['resendpasswd']) && !$conf['resendpasswd']) $disabled[] = 'resendpwd'; - if(isset($conf['subscribers']) && !$conf['subscribers']) { - $disabled[] = 'subscribe'; - } - if (is_null($auth) || !$auth->canDo('addUser')) { + if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if (is_null($auth) || !$auth->canDo('modPass')) { + if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } + if(!empty($conf['subscribers']) || is_null($auth)) { + $disabled[] = 'subscribe'; + } + if (is_null($auth) || !$auth->canDo('Profile')) { + $disabled[] = 'profile'; + } + if (is_null($auth)) { + $disabled[] = 'login'; + } + if (is_null($auth) || !$auth->canDo('logout')) { + $disabled[] = 'logout'; + } $disabled = array_unique($disabled); } -- cgit v1.2.3 From e4eda66bb417c82549108e85453f87df5ba771fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 21 Mar 2011 20:37:05 +0100 Subject: fixed handling of legacy and subscriber config options FS#2208 This was broken in 3a48618a538412994ec244d5a9fde5c4a6161d10 --- inc/confutils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/confutils.php') diff --git a/inc/confutils.php b/inc/confutils.php index b2d25fb65..29ead1e9f 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,13 +241,13 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { + if((isset($conf['openregister']) && !$conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { + if((isset($conf['resendpasswd']) && !$conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } - if(!empty($conf['subscribers']) || is_null($auth)) { + if((isset($conf['subscribers']) && !$conf['subscribers']) || is_null($auth)) { $disabled[] = 'subscribe'; } if (is_null($auth) || !$auth->canDo('Profile')) { -- cgit v1.2.3