From defb7d5769d8bc3c0a23d08419571a19429d1fc6 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 7 May 2011 23:11:00 +0100 Subject: fixed some missing config_cascade occurrences (FS#2235) --- inc/infoutils.php | 3 +- lib/exe/js.php | 4 ++- lib/plugins/acl/admin.php | 70 +++++++++++++++++++++++------------------------ 3 files changed, 40 insertions(+), 37 deletions(-) diff --git a/inc/infoutils.php b/inc/infoutils.php index ab9fe47ad..786661d01 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -176,7 +176,8 @@ function check(){ } if($conf['authtype'] == 'plain'){ - if(is_writable(DOKU_CONF.'users.auth.php')){ + global $config_cascade; + if(is_writable($config_cascade['plainauth.users']['default'])){ msg('conf/users.auth.php is writable',1); }else{ msg('conf/users.auth.php is not writable',0); diff --git a/lib/exe/js.php b/lib/exe/js.php index 5f376ee24..b2ae3f7fe 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -188,9 +188,11 @@ function js_cacheok($cache,$files){ $ctime = @filemtime($cache); if(!$ctime) return false; //There is no cache + global $config_cascade; + // some additional files to check $files = array_merge($files, getConfigFiles('main')); - $files[] = DOKU_CONF.'userscript.js'; + $files[] = $config_cascade['userscript']['default']; $files[] = __FILE__; // now walk the files diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index c8b7b1e6e..ea4184ca3 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -72,7 +72,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { global $config_cascade; // fresh 1:1 copy without replacements - $AUTH_ACL = file(DOKU_CONF.'acl.auth.php'); + $AUTH_ACL = file($config_cascade['acl']['default']); // namespace given? @@ -711,7 +711,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $new_config = $acl_config.$new_acl; - return io_saveFile(DOKU_CONF.'acl.auth.php', $new_config); + return io_saveFile($config_cascade['acl']['default'], $new_config); } /** @@ -729,7 +729,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // save all non!-matching $new_config = preg_grep("/$acl_pattern/", $acl_config, PREG_GREP_INVERT); - return io_saveFile(DOKU_CONF.'acl.auth.php', join('',$new_config)); + return io_saveFile($config_cascade['acl']['default'], join('',$new_config)); } /** @@ -801,40 +801,40 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' '.NL; echo ' '.NL; if (!empty($this->specials)) { - echo ' '.NL; - foreach($this->specials as $ug){ - if($ug == $this->who){ - $sel = ' selected="selected"'; - $inlist = true; - }else{ - $sel = ''; - } - - if($ug{0} == '@'){ - echo ' '.NL; - }else{ - echo ' '.NL; - } - } - echo ' '.NL; + echo ' '.NL; + foreach($this->specials as $ug){ + if($ug == $this->who){ + $sel = ' selected="selected"'; + $inlist = true; + }else{ + $sel = ''; + } + + if($ug{0} == '@'){ + echo ' '.NL; + }else{ + echo ' '.NL; + } + } + echo ' '.NL; } if (!empty($this->usersgroups)) { - echo ' '.NL; - foreach($this->usersgroups as $ug){ - if($ug == $this->who){ - $sel = ' selected="selected"'; - $inlist = true; - }else{ - $sel = ''; - } - - if($ug{0} == '@'){ - echo ' '.NL; - }else{ - echo ' '.NL; - } - } - echo ' '.NL; + echo ' '.NL; + foreach($this->usersgroups as $ug){ + if($ug == $this->who){ + $sel = ' selected="selected"'; + $inlist = true; + }else{ + $sel = ''; + } + + if($ug{0} == '@'){ + echo ' '.NL; + }else{ + echo ' '.NL; + } + } + echo ' '.NL; } echo ''.NL; return $inlist; -- cgit v1.2.3