aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-02-26 12:03:01 +0000
committerplegall <plg@piwigo.org>2010-02-26 12:03:01 +0000
commit0e45412d84e2745569c97c0ecba0f5d905c94c45 (patch)
treeadaec0ed724f58bca763424e82f1bc480bb43669 /include
parentc952f5fc71c4d4f424fd6da6db7eece8557767f1 (diff)
merge r4965 from branch 2.0 to trunk
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/trunk@4966 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 cc2339c64..765f17c51 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -516,6 +516,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)