diff options
author | Kate Arzamastseva <pshns@ukr.net> | 2011-07-11 20:13:10 +0300 |
---|---|---|
committer | Kate Arzamastseva <pshns@ukr.net> | 2011-07-11 20:13:10 +0300 |
commit | b3b326700990f7b793fe4f5dd03cc7b4ab2e9672 (patch) | |
tree | 8b1f75348560a13e098cebe9e9dd6c7606a8c470 | |
parent | 4928b6eb7137cb1e8727ca7a7fc99db614b0df88 (diff) | |
parent | 2d57e114e1b33b0965a48b2838ec5dd38888c3b6 (diff) | |
download | rpg-b3b326700990f7b793fe4f5dd03cc7b4ab2e9672.tar.gz rpg-b3b326700990f7b793fe4f5dd03cc7b4ab2e9672.tar.bz2 |
Merge branch 'master' of git://github.com/splitbrain/dokuwiki into media-revisions
-rw-r--r-- | lib/exe/xmlrpc.php | 21 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/en/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/fr/lang.php | 2 |
3 files changed, 4 insertions, 21 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 108dd8fd1..8b572d213 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -30,26 +30,9 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { global $USERINFO; if(!$conf['useacl']) return true; //no ACL - then no checks + if(trim($conf['xmlrpcuser']) == '') return true; //no restrictions - $allowed = explode(',',$conf['xmlrpcuser']); - $allowed = array_map('trim', $allowed); - $allowed = array_unique($allowed); - $allowed = array_filter($allowed); - - if(!count($allowed)) return true; //no restrictions - - $user = $_SERVER['REMOTE_USER']; - $groups = (array) $USERINFO['grps']; - - if(in_array($user,$allowed)) return true; //user explicitly mentioned - - //check group memberships - foreach($groups as $group){ - if(in_array('@'.$group,$allowed)) return true; - } - - //still here? no access! - return false; + return auth_isMember($conf['xmlrpcuser'],$_SERVER['REMOTE_USER'],(array) $USERINFO['grps']); } /** diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php index 437c168bd..87570a708 100644 --- a/lib/plugins/plugin/lang/en/lang.php +++ b/lib/plugins/plugin/lang/en/lang.php @@ -73,6 +73,6 @@ $lang['enabled'] = 'Plugin %s enabled.'; $lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; $lang['disabled'] = 'Plugin %s disabled.'; $lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) successfully installed.'; //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 618e7a75b..2989d4913 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -61,4 +61,4 @@ $lang['enabled'] = 'Module %s activé.'; $lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.'; $lang['disabled'] = 'Module %s désactivé.'; $lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.'; -$lang['packageinstalled'] = 'Ensemble de modules (%d module%s: %s) installé avec succès.'; +$lang['packageinstalled'] = 'Ensemble de modules (%d module(s): %s) installé avec succès.'; |