diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
commit | 4e60057c8ccbee18b94a64208311f9bbb338eec6 (patch) | |
tree | 08d79159aa78693c27f54ecebc3105034dfc5933 /lib/plugins/acl/ajax.php | |
parent | 57a6f99d09d3662a8a2ad72e312aa6f53bcc2d01 (diff) | |
parent | 069942acdaa5ba825bc3f92c7093b5071789f1ca (diff) | |
download | rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.gz rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.bz2 |
Merge branch 'master' into tablethead
Diffstat (limited to 'lib/plugins/acl/ajax.php')
-rw-r--r-- | lib/plugins/acl/ajax.php | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/lib/plugins/acl/ajax.php b/lib/plugins/acl/ajax.php deleted file mode 100644 index 10e18af97..000000000 --- a/lib/plugins/acl/ajax.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * AJAX call handler for ACL plugin - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - */ - -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); -require_once(DOKU_INC.'inc/init.php'); -//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)){ - parse_str($postData, $_POST); -} - -if(!auth_isadmin()) die('for admins only'); -if(!checkSecurityToken()) die('CRSF Attack'); - -$ID = getID(); - -/** @var $acl admin_plugin_acl */ -$acl = plugin_load('admin','acl'); -$acl->handle(); - -$ajax = $INPUT->str('ajax'); -header('Content-Type: text/html; charset=utf-8'); - -if($ajax == 'info'){ - $acl->_html_info(); -}elseif($ajax == 'tree'){ - - $dir = $conf['datadir']; - $ns = $INPUT->str('ns'); - if($ns == '*'){ - $ns =''; - } - $ns = cleanID($ns); - $lvl = count(explode(':',$ns)); - $ns = utf8_encodeFN(str_replace(':','/',$ns)); - - $data = $acl->_get_tree($ns,$ns); - - 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')); -} - |