diff options
author | Guy Brand <gb@unistra.fr> | 2014-05-05 22:51:26 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2014-05-05 22:51:26 +0200 |
commit | 43a2e077a27740ebb0f0bc49e4a3d288c8811d78 (patch) | |
tree | e22f94855951702e622d4c40ac44f3031b3d5819 /lib/plugins/acl/admin.php | |
parent | c6af9e94ed5d7f7713359faac18543db9a9aee48 (diff) | |
parent | 75930869ddcb31470ea7617eddfb882de02645df (diff) | |
download | rpg-43a2e077a27740ebb0f0bc49e4a3d288c8811d78.tar.gz rpg-43a2e077a27740ebb0f0bc49e4a3d288c8811d78.tar.bz2 |
Merge branch 'master' into stable
Diffstat (limited to 'lib/plugins/acl/admin.php')
-rw-r--r-- | lib/plugins/acl/admin.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 6c7c28ff6..de38aedd5 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -268,7 +268,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { usort($data,array($this,'_tree_sort')); $count = count($data); if($count>0) for($i=1; $i<$count; $i++){ - if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) unset($data[$i]); + if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) { + unset($data[$i]); + $i++; // duplicate found, next $i can't be a duplicate, so skip forward one + } } return $data; } @@ -488,7 +491,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { function _html_list_acl($item){ $ret = ''; // what to display - if($item['label']){ + if(!empty($item['label'])){ $base = $item['label']; }else{ $base = ':'.$item['id']; @@ -496,8 +499,11 @@ 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'; + } else { + $cl = ''; + } // namespace or page? if($item['type']=='d'){ |