aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-02-26 12:00:45 +0000
committerplegall <plg@piwigo.org>2010-02-26 12:00:45 +0000
commitdb5c5f951891cd64f228875574b4ae68c5bc6514 (patch)
tree50e84c761db44c3978c322e9793f83909985134e /include/functions.inc.php
parent8e0bd9d1de4a86f6b4b4a97e4e228e01e9ac4c2f (diff)
bug 1047 fixed: avoid warnings when the creation date is 0000-00-00 (which
happens when date_creation comes from corrupted EXIF) bug 859 fixed: at display time only. Piwigo still inserts wrong date in the database, to be fixed later. git-svn-id: http://piwigo.org/svn/branches/2.0@4965 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 6685bba99..02a783854 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -563,6 +563,11 @@ function format_date($date, $show_time = false)
{
global $lang;
+ if (strpos($date, '0') == 0)
+ {
+ return l10n('N/A');
+ }
+
$ymdhms = array();
$tok = strtok( $date, '- :');
while ($tok !== false)