summaryrefslogtreecommitdiff
path: root/inc/actions.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-03-15 22:30:05 +0100
committerandi <andi@splitbrain.org>2005-03-15 22:30:05 +0100
commitc19fe9c0f68f58ff9c18f0e185a5bc6b591bf798 (patch)
tree39964c8cd4bbc523d76c0057daa1380dc379ae0c /inc/actions.php
parent136ce04017c0b31772ce1f8474a761792b1ccecd (diff)
downloadrpg-c19fe9c0f68f58ff9c18f0e185a5bc6b591bf798.tar.gz
rpg-c19fe9c0f68f58ff9c18f0e185a5bc6b591bf798.tar.bz2
template fixes and ACL admin interface
darcs-hash:20050315213005-9977f-0939681aa5ee37e0ea8cb054ffddb8e6275aa398.gz
Diffstat (limited to 'inc/actions.php')
-rw-r--r--inc/actions.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/inc/actions.php b/inc/actions.php
index e660c136b..282d36ae7 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -59,9 +59,19 @@ function act_dispatch(){
$ACT = 'show';
}
+ //handle admin tasks
+ if($ACT == 'admin'){
+ if($_REQUEST['page'] == 'acl'){
+ require_once(DOKU_INC.'inc/admin_acl.php');
+ admin_acl_handler();
+ }
+ }
+
//call template FIXME: all needed vars available?
header('Content-Type: text/html; charset=utf-8');
include(DOKU_INC.'tpl/'.$conf['template'].'/main.php');
+ // output for the commands is now handled in inc/templates.php
+ // in function tpl_content()
}
/**
@@ -85,7 +95,7 @@ function act_clean($act){
if(!array_search($act,array('login','logout','register','save','edit',
'preview','export_raw','export_html',
'search','show','check','index','revisions',
- 'diff','recent','backlink',))){
+ 'diff','recent','backlink','admin',))){
msg('Unknown command: '.htmlspecialchars($act),-1);
return 'show';
}
@@ -108,6 +118,8 @@ function act_permcheck($act){
}
}elseif(in_array($act,array('login','register','search','recent'))){
$permneed = AUTH_NONE;
+ }elseif($act == 'admin'){
+ $permneed = AUTH_ADMIN;
}else{
$permneed = AUTH_READ;
}