phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: todo/inc class.bo.inc.php,1.1.2.4,1.1.2.5


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: todo/inc class.bo.inc.php,1.1.2.4,1.1.2.5
Date: Tue, 09 Apr 2002 22:59:01 -0400

Update of /cvsroot/phpgroupware/todo/inc
In directory subversions:/tmp/cvs-serv31810/todo/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.bo.inc.php 
Log Message:
Gnu Patch #228.

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.bo.inc.php,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** class.bo.inc.php    8 Apr 2002 23:53:56 -0000       1.1.2.4
--- class.bo.inc.php    10 Apr 2002 02:58:57 -0000      1.1.2.5
***************
*** 284,287 ****
--- 284,289 ----
                function check_values($values)
                {
+                       $datetime = createobject('phpgwapi.datetime');
+                       
                        if (!$values['title'])
                        {
***************
*** 301,313 ****
                        if ($values['smonth'] || $values['sday'] || 
$values['syear'])
                        {
!                                       if (! 
checkdate($values['smonth'],$values['sday'],$values['syear']))
!                                       {
!                                               $error[] = lang('You have 
entered an starting invalid date');
!                                       }
                        }
  
                        if ($values['emonth'] || $values['eday'] || 
$values['eyear'])
                        {
!                               if (! 
checkdate($values['emonth'],$values['eday'],$values['eyear']))
                                {
                                        $error[] = lang('You have entered an 
ending invalid date');
--- 303,315 ----
                        if ($values['smonth'] || $values['sday'] || 
$values['syear'])
                        {
!                               if(! 
$datetime->date_valid($values['syear'],$values['smonth'],$values['sday'])
!                               {
!                                       $error[] = lang('You have entered an 
starting invalid date');
!                               }
                        }
  
                        if ($values['emonth'] || $values['eday'] || 
$values['eyear'])
                        {
!                               if(! 
$datetime->date_valid($values['eyear'],$values['emonth'],$values['eday'])
                                {
                                        $error[] = lang('You have entered an 
ending invalid date');
***************
*** 315,322 ****
                        }
  
! /*                    if ($values['edate'] < $values['sdate'] && 
$values['edate'] && $values['sdate'])
                        {
                                $error[] = lang('Ending date can not be before 
start date');
!                       } */
  
                        if (is_array($error))
--- 317,332 ----
                        }
  
!                       if ($values['edate'] < $values['sdate'] && 
$values['edate'] && $values['sdate'])
                        {
                                $error[] = lang('Ending date can not be before 
start date');
!                       }
! 
!                       if (($values['smonth'] || $values['sday'] || 
$values['syear']) && ($values['emonth'] || $values['eday'] || $values['eyear']))
!                       {
!                               
if($datetime->date_compare($values['eyear'],$values['emonth'],$values['eday'],$values['syear'],$values['smonth'],$values['sday'])
 == -1)
!                               {
!                                       $error[] = lang('Ending date can not be 
before start date');
!                               }
!                       }
  
                        if (is_array($error))




reply via email to

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