cvs: phpweb /include layout.inc
| From: | Hannes Magnusson | Date: | Sun, 30 Mar 2008 20:25:33 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-1423@lists.php.net to get a copy of this message | ||
bjori Sun Mar 30 20:25:33 2008 UTC
Modified files:
/phpweb/include layout.inc
Log:
Fix PHP4 support
http://cvs.php.net/viewvc.cgi/phpweb/include/layout.inc?r1=1.281&r2=1.282&diff_format=u
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.281 phpweb/include/layout.inc:1.282
--- phpweb/include/layout.inc:1.281 Thu Mar 20 19:44:03 2008
+++ phpweb/include/layout.inc Sun Mar 30 20:25:33 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.281 2008/03/20 19:44:03 bjori Exp $ */
+/* $Id: layout.inc,v 1.282 2008/03/30 20:25:33 bjori Exp $ */
// Set the static content root differently on php.net
$_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ?
@@ -694,7 +694,9 @@
$permlink = "#" .$id;
}
- $newsdate = date("d-M-Y", strtotime($item["updated"]));
+ // PHP4 strtotime() doesn't support RFC3339 timestamps
+ $updated = substr($item["updated"], 0, 10);
+ $newsdate = date("d-M-Y", strtotime($updated));
echo <<< EOT
<div class="newsItem hentry{$vevent}">