cvs: smarty /plugins modifier.date_format.php

From: Date: Wed, 19 Jun 2002 14:25:02 +0000
Subject: cvs: smarty /plugins modifier.date_format.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-144@lists.php.net to get a copy of this message
mohrt Wed Jun 19 10:25:02 2002 EDT Modified files: /smarty/plugins modifier.date_format.php Log: fix date_format modifier, return nothing if given empty string Index: smarty/plugins/modifier.date_format.php diff -u smarty/plugins/modifier.date_format.php:1.4 smarty/plugins/modifier.date_format.php:1.5 --- smarty/plugins/modifier.date_format.php:1.4 Thu Mar 28 09:52:52 2002 +++ smarty/plugins/modifier.date_format.php Wed Jun 19 10:25:01 2002 @@ -11,7 +11,11 @@ require_once SMARTY_DIR . $this->plugins_dir . '/shared.make_timestamp.php'; function smarty_modifier_date_format($string, $format="%b %e, %Y") { - return strftime($format, smarty_make_timestamp($string)); + if($string != '') { + return strftime($format, smarty_make_timestamp($string)); + } else { + return; + } } /* vim: set expandtab: */

« previous php.smarty.cvs (#144) next »