Skip to content
Snippets Groups Projects
Commit d072820d authored by Christopher Smith's avatar Christopher Smith
Browse files

improvements in acl plugin to avoid missing var errors

parent d30d4913
No related branches found
No related tags found
No related merge requests found
......@@ -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'){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment