aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2014-08-09 15:11:25 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2014-08-09 15:11:25 +0000
commit5772fe32c48c8d0d01feb8c88d440f0910077ba6 (patch)
treee247fb17f752639f13a6531dd46c6d23809f1607
parent0078b843416bfc9d431b7b5e3c4a2d49e8fc3ecc (diff)
downloadpmwiki.svn-5772fe32c48c8d0d01feb8c88d440f0910077ba6.tar.bz2
Allow $PostConfig entries to be launched after per-page customization, before other stdconfig.php inclusions if values<50
git-svn-id: svn://pmwiki.org/pmwiki/trunk@2994 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r--pmwiki.php2
-rw-r--r--scripts/stdconfig.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/pmwiki.php b/pmwiki.php
index 5609536b..3509b459 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -341,7 +341,7 @@ if (IsEnabled($EnableStdConfig,1))
if (isset($PostConfig) && is_array($PostConfig)) {
asort($PostConfig, SORT_NUMERIC);
foreach ($PostConfig as $k=>$v) {
- if (!$k || !$v || $v<0) continue;
+ if (!$k || !$v || $v<50) continue;
if (function_exists($k)) $k($pagename);
elseif (file_exists($k)) include_once($k);
}
diff --git a/scripts/stdconfig.php b/scripts/stdconfig.php
index 82213547..b217daf0 100644
--- a/scripts/stdconfig.php
+++ b/scripts/stdconfig.php
@@ -29,6 +29,14 @@ if (!function_exists('session_start') && IsEnabled($EnableRequireSession, 1))
if (IsEnabled($EnablePGCust,1))
include_once("$FarmD/scripts/pgcust.php");
+if (isset($PostConfig) && is_array($PostConfig)) {
+ asort($PostConfig, SORT_NUMERIC);
+ foreach ($PostConfig as $k=>$v) {
+ if (!$k || !$v || $v<0 || $v>=50) continue;
+ if (function_exists($k)) $k($pagename);
+ elseif (file_exists($k)) include_once($k);
+ }
+}
if (IsEnabled($EnableRobotControl,1))
include_once("$FarmD/scripts/robots.php");