From 7d644fc84a081164fcbedbe2b6aad7127ac4e4d0 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sun, 6 Apr 2008 19:47:18 +0200
Subject: [PATCH] work around strftime character limit on parsing namespace
 templates FS#1366

darcs-hash:20080406174718-7ad00-89b3946e17ce49566c0f51f3194776a0bdb4768d.gz
---
 inc/common.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
 }
 
-- 
GitLab