summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-04-06 19:47:18 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-04-06 19:47:18 +0200
commit7d644fc84a081164fcbedbe2b6aad7127ac4e4d0 (patch)
tree57f4bedaa263588a9f70841de7a1b2ff36cb598e
parent354bc9918a15b0ae65f67acd0afc0e7f87b72ce1 (diff)
downloadrpg-7d644fc84a081164fcbedbe2b6aad7127ac4e4d0.tar.gz
rpg-7d644fc84a081164fcbedbe2b6aad7127ac4e4d0.tar.bz2
work around strftime character limit on parsing namespace templates FS#1366
darcs-hash:20080406174718-7ad00-89b3946e17ce49566c0f51f3194776a0bdb4768d.gz
-rw-r--r--inc/common.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php
index d340e90a9..687d2accd 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -738,7 +738,9 @@ function pageTemplate($data){
$tpl = str_replace('@NAME@',$INFO['userinfo']['name'],$tpl);
$tpl = str_replace('@MAIL@',$INFO['userinfo']['mail'],$tpl);
$tpl = str_replace('@DATE@',$conf['dformat'],$tpl);
- $tpl = strftime($tpl);
+ // we need the callback to work around strftime's char limit
+ $tpl = preg_replace_callback('/%./',create_function('$m','return strftime($m[0]);'),$tpl);
+
return $tpl;
}