diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-10-14 16:00:45 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-10-14 16:00:45 +0200 |
commit | 219fe1dcb7250b332a77278fd31f20e5da10846c (patch) | |
tree | a900bf6ec12b44e73e9a3813b076150faf82b1e5 /lib/plugins | |
parent | d4e2226677c742531e589ebd2b45fdd4553322ad (diff) | |
download | rpg-219fe1dcb7250b332a77278fd31f20e5da10846c.tar.gz rpg-219fe1dcb7250b332a77278fd31f20e5da10846c.tar.bz2 |
Code reformatting and remove unused global conf
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/acl/action.php | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/plugins/acl/action.php b/lib/plugins/acl/action.php index 373d6cbb0..01842250e 100644 --- a/lib/plugins/acl/action.php +++ b/lib/plugins/acl/action.php @@ -30,62 +30,62 @@ class action_plugin_acl extends DokuWiki_Action_Plugin { * AJAX call handler for ACL plugin * * @param Doku_Event $event event object by reference - * @param mixed $param empty + * @param mixed $param empty * @return void */ public function handle_ajax_call_acl(Doku_Event &$event, $param) { - if ($event->data !== 'plugin_acl') { + if($event->data !== 'plugin_acl') { return; } $event->stopPropagation(); $event->preventDefault(); - //close session session_write_close(); - global $conf; global $ID; global $INPUT; //fix for Opera XMLHttpRequests $postData = http_get_raw_post_data(); - if(!count($_POST) && !empty($postData)){ + if(!count($_POST) && !empty($postData)) { parse_str($postData, $_POST); } if(!auth_isadmin()) die('for admins only'); if(!checkSecurityToken()) die('CRSF Attack'); - $ID = getID(); + $ID = getID(); /** @var $acl admin_plugin_acl */ - $acl = plugin_load('admin','acl'); + $acl = plugin_load('admin', 'acl'); $acl->handle(); $ajax = $INPUT->str('ajax'); header('Content-Type: text/html; charset=utf-8'); - if($ajax == 'info'){ + if($ajax == 'info') { $acl->_html_info(); - }elseif($ajax == 'tree'){ + } elseif($ajax == 'tree') { - $ns = $INPUT->str('ns'); - if($ns == '*'){ - $ns =''; + $ns = $INPUT->str('ns'); + if($ns == '*') { + $ns = ''; } - $ns = cleanID($ns); - $lvl = count(explode(':',$ns)); - $ns = utf8_encodeFN(str_replace(':','/',$ns)); + $ns = cleanID($ns); + $lvl = count(explode(':', $ns)); + $ns = utf8_encodeFN(str_replace(':', '/', $ns)); - $data = $acl->_get_tree($ns,$ns); + $data = $acl->_get_tree($ns, $ns); - foreach(array_keys($data) as $item){ - $data[$item]['level'] = $lvl+1; + foreach(array_keys($data) as $item) { + $data[$item]['level'] = $lvl + 1; } - echo html_buildlist($data, 'acl', array($acl, '_html_list_acl'), - array($acl, '_html_li_acl')); + echo html_buildlist( + $data, 'acl', array($acl, '_html_list_acl'), + array($acl, '_html_li_acl') + ); } } }
\ No newline at end of file |