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.6,1.1.2.7 class.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: todo/inc class.bo.inc.php,1.1.2.6,1.1.2.7 class.so.inc.php,1.1.2.3,1.1.2.4 class.ui.inc.php,1.2.2.11,1.2.2.12
Date: Sat, 13 Apr 2002 17:20:59 -0400

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.bo.inc.php class.so.inc.php class.ui.inc.php 
Log Message:
some fixes

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.bo.inc.php,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** class.bo.inc.php    13 Apr 2002 18:57:38 -0000      1.1.2.6
--- class.bo.inc.php    13 Apr 2002 21:20:57 -0000      1.1.2.7
***************
*** 39,43 ****
                function bo($session=False)
                {
!                       $this->sotodo = CreateObject('todo.so');
  
                        if ($session)
--- 39,44 ----
                function bo($session=False)
                {
!                       $this->sotodo   = CreateObject('todo.so');
!                       $this->datetime = CreateObject('phpgwapi.datetime');
  
                        if ($session)
***************
*** 179,198 ****
                }
  
- /*            function check_record_rights($todo_id, $required_rights)
-               {
-                       $this->db->query("select todo_owner from phpgw_todo 
where todo_id='$todo_id'");
-                       $this->db->next_record();
- 
-                       // Make sure this user has access to this item
-                       if (! 
$this->check_perms($this->grants[$this->db->f('todo_owner')],$required_rights) 
&& $this->db->f('todo_owner') != $GLOBALS['phpgw_info']['user']['account_id'])
-                       {
-                               return False;
-                       }
-                       else
-                       {
-                               return True;
-                       }
-               } */
- 
                function check_perms($has, $needed)
                {
--- 180,183 ----
***************
*** 234,242 ****
                        while (is_array($todos) && list(,$v) = each($todos))
                        {
-                               $v['sdate'] = 
$GLOBALS['phpgw']->common->show_date($v['sdate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
  
!                               if ($v['edate'])
                                {
!                                       $v['edate'] = 
$GLOBALS['phpgw']->common->show_date($v['edate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                }
                                else
--- 219,230 ----
                        while (is_array($todos) && list(,$v) = each($todos))
                        {
  
!                               $sdate          = $v['sdate'] - 
$this->datetime->tz_offset;
!                               $v['sdate'] = 
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
! 
!                               if ($v['edate'] && $v['edate'] != 0)
                                {
!                                       $edate          = $v['edate'] - 
$this->datetime->tz_offset;
!                                       $v['edate'] = 
$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                }
                                else
***************
*** 283,288 ****
                function check_values($values)
                {
-                       $datetime = CreateObject('phpgwapi.datetime');
- 
                        if (!$values['title'])
                        {
--- 271,274 ----
***************
*** 302,306 ****
                        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');
--- 288,292 ----
                        if ($values['smonth'] || $values['sday'] || 
$values['syear'])
                        {
!                               if(! 
$this->datetime->date_valid($values['syear'],$values['smonth'],$values['sday']))
                                {
                                        $error[] = lang('You have entered an 
starting invalid date');
***************
*** 310,314 ****
                        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');
--- 296,300 ----
                        if ($values['emonth'] || $values['eday'] || 
$values['eyear'])
                        {
!                               if(! 
$this->datetime->date_valid($values['eyear'],$values['emonth'],$values['eday']))
                                {
                                        $error[] = lang('You have entered an 
ending invalid date');
***************
*** 323,327 ****
                        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');
--- 309,313 ----
                        if (($values['smonth'] || $values['sday'] || 
$values['syear']) && ($values['emonth'] || $values['eday'] || $values['eyear']))
                        {
!                               
if($this->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');

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.so.inc.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** class.so.inc.php    1 Feb 2002 03:47:49 -0000       1.1.2.3
--- class.so.inc.php    13 Apr 2002 21:20:57 -0000      1.1.2.4
***************
*** 31,50 ****
                }
  
- /*            function check_record_rights($todo_id, $required_rights)
-               {
-                       $this->db->query("select todo_owner from phpgw_todo 
where todo_id='$todo_id'");
-                       $this->db->next_record();
- 
-                       // Make sure this user has access to this item
-                       if (! 
$this->check_perms($this->grants[$this->db->f('todo_owner')],$required_rights) 
&& $this->db->f('todo_owner') != $GLOBALS['phpgw_info']['user']['account_id'])
-                       {
-                               return False;
-                       }
-                       else
-                       {
-                               return True;
-                       }
-               } */
- 
                function type($tree)
                {
--- 31,34 ----
***************
*** 210,219 ****
                function add_todo($values)
                {
!                       ob_start();
!                       print_r($values);
!                       $contents = ob_get_contents();
!                       ob_end_clean();
  
!                       $GLOBALS['phpgw']->log->message(array(
                                'text' => 'debug, so add_todo values: %1',
                                'p1'   => $contents,
--- 194,207 ----
                function add_todo($values)
                {
!                       if (floor(phpversion()) == 4)
!                       {
!                               ob_start();
!                               print_r($values);
!                               $contents = ob_get_contents();
!                               ob_end_clean();
!                       }
  
!                       $GLOBALS['phpgw']->log->message(array
!                       (
                                'text' => 'debug, so add_todo values: %1',
                                'p1'   => $contents,

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.ui.inc.php,v
retrieving revision 1.2.2.11
retrieving revision 1.2.2.12
diff -C2 -r1.2.2.11 -r1.2.2.12
*** class.ui.inc.php    21 Mar 2002 17:05:24 -0000      1.2.2.11
--- class.ui.inc.php    13 Apr 2002 21:20:57 -0000      1.2.2.12
***************
*** 481,486 ****
                        
$this->t->set_var('value_category',$this->cats->id2name($values['cat']));
  
!                       
$this->t->set_var('value_start_date',$GLOBALS['phpgw']->common->show_date($values['sdate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
!                       
$this->t->set_var('value_end_date',$GLOBALS['phpgw']->common->show_date($values['edate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
  
                        $parent_values = $this->bo->read($values['parent']);
--- 481,492 ----
                        
$this->t->set_var('value_category',$this->cats->id2name($values['cat']));
  
!                       $sdate = $values['sdate'] - 
$this->bo->datetime->tz_offset;
!                       
$this->t->set_var('value_start_date',$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
! 
!                       if ($values['edate'] && $values[''edate] != 0)
!                       {
!                               $edate = $values['edate'] - 
$this->bo->datetime->tz_offset;
!                               
$this->t->set_var('value_end_date',$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
!                       }
  
                        $parent_values = $this->bo->read($values['parent']);
***************
*** 637,641 ****
                                if ($subs)
                                {
!                                       $this->bo->delete_todo($todo_id,True);
                                }
                                else
--- 643,647 ----
                                if ($subs)
                                {
!                                       $this->bo->delete($todo_id,True);
                                }
                                else




reply via email to

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