diff options
Diffstat (limited to 'lib/plugins/acl')
-rw-r--r-- | lib/plugins/acl/admin.php | 72 | ||||
-rw-r--r-- | lib/plugins/acl/lang/bg/lang.php | 2 |
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=" ">'.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=" ">'.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=" ">'.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=" ">'.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'] = 'Никакви'; |