summaryrefslogtreecommitdiff
path: root/lib/plugins/acl
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
commitf493983cbddc6c8c387a76bf3f6631853485162b (patch)
tree38cc53f0b287fde2a1b4426faa8a6fff1e56d769 /lib/plugins/acl
parent058f1c3e98b1437a691cc77a36002dee1c41f007 (diff)
parent342e58c8c048bfd5f57f10bd88cee95aa2732e96 (diff)
downloadrpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.gz
rpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/plugins/acl')
-rw-r--r--lib/plugins/acl/admin.php72
-rw-r--r--lib/plugins/acl/lang/bg/lang.php2
2 files changed, 39 insertions, 35 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 3e7bd8121..c8b7b1e6e 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -17,7 +17,7 @@ if(!defined('DOKU_INC')) die();
class admin_plugin_acl extends DokuWiki_Admin_Plugin {
var $acl = null;
var $ns = null;
- /**
+ /**
* The currently selected item, associative array with id and type.
* Populated from (in this order):
* $_REQUEST['current_ns']
@@ -37,7 +37,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
return array(
'author' => 'Andreas Gohr',
'email' => 'andi@splitbrain.org',
- 'date' => '2010-01-17',
+ 'date' => '2011-04-16',
'name' => 'ACL Manager',
'desc' => 'Manage Page Access Control Lists',
'url' => 'http://dokuwiki.org/plugin:acl',
@@ -449,7 +449,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
$user = '';
$groups = array(ltrim($who,'@'));
}else{
- $user = auth_nameencode($who);
+ $user = $who;
$info = $auth->getUserData($user);
if($info === false){
$groups = array();
@@ -521,7 +521,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
}
// highlight?
- if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id']))
+ if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id']))
$cl = ' cur';
// namespace or page?
@@ -800,38 +800,42 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
echo '<select name="acl_t" class="edit">'.NL;
echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL;
echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL;
- echo ' <optgroup label="&nbsp;">'.NL;
- foreach($this->specials as $ug){
- if($ug == $this->who){
- $sel = ' selected="selected"';
- $inlist = true;
- }else{
- $sel = '';
- }
-
- if($ug{0} == '@'){
- echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
- }else{
- echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
- }
+ if (!empty($this->specials)) {
+ echo ' <optgroup label="&nbsp;">'.NL;
+ foreach($this->specials as $ug){
+ if($ug == $this->who){
+ $sel = ' selected="selected"';
+ $inlist = true;
+ }else{
+ $sel = '';
+ }
+
+ if($ug{0} == '@'){
+ echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
+ }else{
+ echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
+ }
+ }
+ echo ' </optgroup>'.NL;
}
- echo ' </optgroup>'.NL;
- echo ' <optgroup label="&nbsp;">'.NL;
- foreach($this->usersgroups as $ug){
- if($ug == $this->who){
- $sel = ' selected="selected"';
- $inlist = true;
- }else{
- $sel = '';
- }
-
- if($ug{0} == '@'){
- echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
- }else{
- echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
- }
+ if (!empty($this->usersgroups)) {
+ echo ' <optgroup label="&nbsp;">'.NL;
+ foreach($this->usersgroups as $ug){
+ if($ug == $this->who){
+ $sel = ' selected="selected"';
+ $inlist = true;
+ }else{
+ $sel = '';
+ }
+
+ if($ug{0} == '@'){
+ echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
+ }else{
+ echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
+ }
+ }
+ echo ' </optgroup>'.NL;
}
- echo ' </optgroup>'.NL;
echo '</select>'.NL;
return $inlist;
}
diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php
index 2b956deba..0746e32c9 100644
--- a/lib/plugins/acl/lang/bg/lang.php
+++ b/lib/plugins/acl/lang/bg/lang.php
@@ -24,7 +24,7 @@ $lang['p_inherited'] = 'Бележка: Тези разрешения
$lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.';
$lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.';
$lang['current'] = 'Текущи ACL права';
-$lang['where'] = 'Страница/Именно постранство';
+$lang['where'] = 'Страница/Именно пространство';
$lang['who'] = 'Потребител/Група';
$lang['perm'] = 'Права';
$lang['acl_perm0'] = 'Никакви';