diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 22:11:19 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 22:11:19 +0000 |
commit | d072820d2d17a702aaa47a0dccb89cd50f982b98 (patch) | |
tree | 2ae920313930f33a2bb5f824d26064252d33a41b /lib/plugins/acl | |
parent | d30d491370b894b5c76e28362a0a3313f74a439e (diff) | |
download | rpg-d072820d2d17a702aaa47a0dccb89cd50f982b98.tar.gz rpg-d072820d2d17a702aaa47a0dccb89cd50f982b98.tar.bz2 |
improvements in acl plugin to avoid missing var errors
Diffstat (limited to 'lib/plugins/acl')
-rw-r--r-- | lib/plugins/acl/admin.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 00bf9969f..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; } @@ -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'){ |