[ghelda-devel] [40] Update g_functions.php to permit a better detection of dates

[ Thread Index | Date Index | More lists.tuxfamily.org/ghelda-devel Archives ]


Revision: 40
Author:   odyx
Date:     2009-05-20 13:48:12 +0200 (Wed, 20 May 2009)

Log Message:
-----------
Update g_functions.php to permit a better detection of dates

Modified Paths:
--------------
    trunk/inc/g_functions.php


Modified: trunk/inc/g_functions.php
===================================================================
--- trunk/inc/g_functions.php	2009-05-01 12:15:28 UTC (rev 39)
+++ trunk/inc/g_functions.php	2009-05-20 11:48:12 UTC (rev 40)
@@ -38,7 +38,7 @@
     if(stripos($type,'date') !== false) {
         // It's a date
         if(empty($ArrayVals[$fieldName.'_year']) || empty($ArrayVals[$fieldName.'_month']) || empty($ArrayVals[$fieldName.'_day'])) {
-            return '0000-00-00';
+            return '0-0-0';
         } elseif(checkdate((int)$ArrayVals[$fieldName.'_month'],(int)$ArrayVals[$fieldName.'_day'],(int)$ArrayVals[$fieldName.'_year'])) {
             return $ArrayVals[$fieldName.'_year'].'-'.$ArrayVals[$fieldName.'_month'].'-'.$ArrayVals[$fieldName.'_day'];
         }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/