fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15622] booking: validate datetime


From: sigurdne
Subject: [Fmsystem-commits] [15622] booking: validate datetime
Date: Thu, 8 Sep 2016 10:56:17 +0000 (UTC)

Revision: 15622
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15622
Author:   sigurdne
Date:     2016-09-08 10:56:17 +0000 (Thu, 08 Sep 2016)
Log Message:
-----------
booking: validate datetime

Modified Paths:
--------------
    trunk/booking/inc/class.sobooking.inc.php
    trunk/booking/setup/phpgw_no.lang

Modified: trunk/booking/inc/class.sobooking.inc.php
===================================================================
--- trunk/booking/inc/class.sobooking.inc.php   2016-09-08 10:55:50 UTC (rev 
15621)
+++ trunk/booking/inc/class.sobooking.inc.php   2016-09-08 10:56:17 UTC (rev 
15622)
@@ -146,6 +146,11 @@
                        $start = $from_->format('Y-m-d H:i');
                        $end = $to_->format('Y-m-d H:i');
 
+                       if ($entity['from_'] == $entity['to_'])
+                       {
+                               $errors['to_'] = lang('Invalid to date');
+                               return; //No need to continue validation if 
dates are invalid
+                       }
                        if (strtotime($start) > strtotime($end))
                        {
                                $errors['from_'] = lang('Invalid from date');

Modified: trunk/booking/setup/phpgw_no.lang
===================================================================
--- trunk/booking/setup/phpgw_no.lang   2016-09-08 10:55:50 UTC (rev 15621)
+++ trunk/booking/setup/phpgw_no.lang   2016-09-08 10:56:17 UTC (rev 15622)
@@ -341,6 +341,7 @@
 Overlaps with existing booking booking no      Overlapper med eksisterende 
booking
 This booking is not within the selected season booking no      Denne bookingen 
ligger utenfor angitt sesong
 Invalid from date      booking no      Ugyldig fradato
+invalid to date        booking no      Ugyldig tildato
 This booking is outside the organization's allocated time      booking no      
Denne bookingen ligger utenfor organisasjonens tildelte tid
 Overlaps other organizations allocation        booking no      Overlapper med 
en annen organisasjons tildeling
 The booking uses resources not in the containing allocation    booking no      
Bookingen bruker ressurser som ikke finnes i gitt tildeling




reply via email to

[Prev in Thread] Current Thread [Next in Thread]