aboutsummaryrefslogtreecommitdiff
path: root/scripts/authuser.php
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2018-07-05 14:56:38 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2018-07-05 14:56:38 +0000
commitc6e9500f5cc35578082d97338b3614b800600355 (patch)
tree5dc77d8ff23461d667d669e106359406222d816b /scripts/authuser.php
parent1c4b85f9e7cc588104f57db3e1ac6c0efbc6a8ac (diff)
downloadpmwiki.svn-c6e9500f5cc35578082d97338b3614b800600355.tar.bz2
Add $PCCFOverrideFunction. $AuthUserPageFmt can now be an array of page names. Add $PageCacheFileFmt default to "%s/%s,cache" (like before), allowing custom cache filenames. Form checkbox labels now have the same tooltip title as the checkbox. RefCount: add label to checkbox, class to table. Vardoc: fix markup call, reported by Hans-Jürgen Godau. pmcrypt() return false when salt appears to be some old PmWiki attribute.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@3379 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'scripts/authuser.php')
-rw-r--r--scripts/authuser.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/authuser.php b/scripts/authuser.php
index 4b55c66a..b7575094 100644
--- a/scripts/authuser.php
+++ b/scripts/authuser.php
@@ -55,16 +55,18 @@ function AuthUserId($pagename, $id, $pw=NULL) {
$id => 'AuthUserConfig'));
SDV($AuthUserPat, "/^\\s*([@\\w][^\\s:]*):(.*)/m");
- $pn = FmtPageName($AuthUserPageFmt, $pagename);
- $apage = ReadPage($pn, READPAGE_CURRENT);
- if ($apage && preg_match_all($AuthUserPat,
- $apage['text'], $matches, PREG_SET_ORDER)) {
- foreach($matches as $m) {
- if (!preg_match_all('/\\bldaps?:\\S+|[^\\s,]+/', $m[2], $v))
- continue;
- if ($m[1]{0} == '@')
- foreach($v[0] as $g) $auth[$g][] = $m[1];
- else $auth[$m[1]] = array_merge((array)@$auth[$m[1]], $v[0]);
+ foreach ( (array)$AuthUserPageFmt as $aupn) {
+ $pn = FmtPageName($aupn, $pagename);
+ $apage = ReadPage($pn, READPAGE_CURRENT);
+ if ($apage && preg_match_all($AuthUserPat,
+ $apage['text'], $matches, PREG_SET_ORDER)) {
+ foreach($matches as $m) {
+ if (!preg_match_all('/\\bldaps?:\\S+|[^\\s,]+/', $m[2], $v))
+ continue;
+ if ($m[1]{0} == '@')
+ foreach($v[0] as $g) $auth[$g][] = $m[1];
+ else $auth[$m[1]] = array_merge((array)@$auth[$m[1]], $v[0]);
+ }
}
}