diff options
author | Kate Arzamastseva <pshns@ukr.net> | 2011-04-18 17:00:40 +0300 |
---|---|---|
committer | Kate Arzamastseva <pshns@ukr.net> | 2011-04-18 17:00:40 +0300 |
commit | f493983cbddc6c8c387a76bf3f6631853485162b (patch) | |
tree | 38cc53f0b287fde2a1b4426faa8a6fff1e56d769 /lib/plugins/acl/admin.php | |
parent | 058f1c3e98b1437a691cc77a36002dee1c41f007 (diff) | |
parent | 342e58c8c048bfd5f57f10bd88cee95aa2732e96 (diff) | |
download | rpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.gz rpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.bz2 |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/plugins/acl/admin.php')
-rw-r--r-- | lib/plugins/acl/admin.php | 72 |
1 files changed, 38 insertions, 34 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; } |