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,1.1.2.1 class.so.i


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: todo/inc class.bo.inc.php,1.1,1.1.2.1 class.so.inc.php,1.1.2.1,1.1.2.2 class.ui.inc.php,1.2,1.2.2.1
Date: Thu, 31 Jan 2002 20:47:52 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.bo.inc.php class.so.inc.php class.ui.inc.php 
Log Message:
Trying to fix sqsof var settings



Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.bo.inc.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** class.bo.inc.php    3 Dec 2001 19:44:38 -0000       1.1
--- class.bo.inc.php    1 Feb 2002 01:47:50 -0000       1.1.2.1
***************
*** 39,44 ****
                function bo($session=False)
                {
-                       global $phpgw;
- 
                        $this->sotodo = CreateObject('todo.so');
  
--- 39,42 ----
***************
*** 49,60 ****
                        }
  
!                       global $start, $query, $filter, $order, $sort, $cat_id;
  
-                       if(isset($start)) { $this->start = $start; }
-                       if(isset($query)) { $this->query = $query; }
-                       if(!empty($filter)) { $this->filter = $filter; }
-                       if(isset($sort)) { $this->sort = $sort; }
-                       if(isset($order)) { $this->order = $order; }
-                       if(isset($cat_id)) { $this->cat_id = $cat_id; }
                }
  
--- 47,98 ----
                        }
  
!                       $_start   = $GLOBALS['HTTP_POST_VARS']['start']   ? 
$GLOBALS['HTTP_POST_VARS']['start']   : $GLOBALS['HTTP_GET_VARS']['start'];
!                       $_query   = $GLOBALS['HTTP_POST_VARS']['query']   ? 
$GLOBALS['HTTP_POST_VARS']['query']   : $GLOBALS['HTTP_GET_VARS']['query'];
!                       $_sort    = $GLOBALS['HTTP_POST_VARS']['sort']    ? 
$GLOBALS['HTTP_POST_VARS']['sort']    : $GLOBALS['HTTP_GET_VARS']['sort'];
!                       $_order   = $GLOBALS['HTTP_POST_VARS']['order']   ? 
$GLOBALS['HTTP_POST_VARS']['order']   : $GLOBALS['HTTP_GET_VARS']['order'];
!                       $_filter  = $GLOBALS['HTTP_POST_VARS']['filter']  ? 
$GLOBALS['HTTP_POST_VARS']['filter']  : $GLOBALS['HTTP_GET_VARS']['filter'];
!                       $_cat_id  = $GLOBALS['HTTP_POST_VARS']['cat_id']  ? 
$GLOBALS['HTTP_POST_VARS']['cat_id']  : $GLOBALS['HTTP_GET_VARS']['cat_id'];
! 
!                       if(!empty($_start) || ($_start == '0') || ($_start == 
0))
!                       {
!                               if($this->debug) { echo '<br>overriding $start: 
"' . $this->start . '" now "' . $_start . '"'; }
!                               $this->start = $_start;
!                       }
!                       if($_limit)
!                       {
!                               $this->limit  = $_limit;
!                       }
!                       if((empty($_query) && !empty($this->query)) || 
!empty($_query))
!                       {
!                               $this->query  = $_query;
!                       }
! 
!                       if(isset($_cat_id) && !empty($_cat_id))
!                       {
!                               $this->cat_id = $_cat_id;
!                       }
!                       if($_cat_id == '0' || $_cat_id == 0 || $_cat_id == '')
!                       {
!                               $this->cat_id = 0;
!                       }
! 
!                       if(isset($_sort)   && !empty($_sort))
!                       {
!                               if($this->debug) { echo '<br>overriding $sort: 
"' . $this->sort . '" now "' . $_sort . '"'; }
!                               $this->sort   = $_sort;
!                       }
! 
!                       if(isset($_order)  && !empty($_order))
!                       {
!                               if($this->debug) { echo '<br>overriding $order: 
"' . $this->order . '" now "' . $_order . '"'; }
!                               $this->order  = $_order;
!                       }
! 
!                       if(isset($_filter) && !empty($_filter))
!                       {
!                               if($this->debug) { echo '<br>overriding 
$filter: "' . $this->filter . '" now "' . $_filter . '"'; }
!                               $this->filter = $_filter;
!                       }
  
                }
  
***************
*** 116,124 ****
                function save_sessiondata($data)
                {
-                       global $phpgw;
- 
                        if ($this->use_session)
                        {
!                               
$phpgw->session->appsession('session_data','todo',$data);
                        }
                }
--- 154,160 ----
                function save_sessiondata($data)
                {
                        if ($this->use_session)
                        {
!                               
$GLOBALS['phpgw']->session->appsession('session_data','todo',$data);
                        }
                }
***************
*** 126,132 ****
                function read_sessiondata()
                {
!                       global $phpgw;
! 
!                       $data = 
$phpgw->session->appsession('session_data','todo');
  
                        $this->start    = $data['start'];
--- 162,166 ----
                function read_sessiondata()
                {
!                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data','todo');
  
                        $this->start    = $data['start'];
***************
*** 140,150 ****
  /*            function check_record_rights($todo_id, $required_rights)
                {
-                       global $phpgw_info;
- 
                        $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') != $phpgw_info['user']['account_id'])
                        {
                                return False;
--- 174,182 ----
  /*            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;
***************
*** 163,168 ****
                function cached_accounts($account_id)
                {
-                       global $phpgw;
- 
                        $this->accounts = 
CreateObject('phpgwapi.accounts',$account_id);
                        $this->accounts->read_repository();
--- 195,198 ----
***************
*** 198,202 ****
                        {
                                $v['sdate'] = 
$GLOBALS['phpgw']->common->show_date($v['sdate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!       
                                if ($v['edate'])
                                {
--- 228,232 ----
                        {
                                $v['sdate'] = 
$GLOBALS['phpgw']->common->show_date($v['sdate'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
! 
                                if ($v['edate'])
                                {
***************
*** 211,215 ****
  
                                $v['owner']  = 
$GLOBALS['phpgw']->common->display_fullname($cached_data[$v['owner']]['account_lid'],
!                                                                               
$cached_data[$v['owner']]['firstname'],$cached_data[$v['owner']]['lastname']);
  
                                $r[] = array(
--- 241,245 ----
  
                                $v['owner']  = 
$GLOBALS['phpgw']->common->display_fullname($cached_data[$v['owner']]['account_lid'],
!                                       
$cached_data[$v['owner']]['firstname'],$cached_data[$v['owner']]['lastname']);
  
                                $r[] = array(
***************
*** 246,251 ****
                function check_values($values)
                {
-                       global $phpgw;
- 
                        if (!$values['title'])
                        {
--- 276,279 ----
***************
*** 313,320 ****
                        }
  
!             if (!$values['sdate'])
!             {
!                 $values['sdate'] = time();
!             }
  
                        if ($values['emonth'] || $values['eday'] || 
$values['eyear'])
--- 341,348 ----
                        }
  
!                       if (!$values['sdate'])
!                       {
!                               $values['sdate'] = time();
!                       }
  
                        if ($values['emonth'] || $values['eday'] || 
$values['eyear'])
***************
*** 380,382 ****
                }
        }
! ?>
\ No newline at end of file
--- 408,410 ----
                }
        }
! ?>

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.so.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** class.so.inc.php    24 Jan 2002 19:27:21 -0000      1.1.2.1
--- class.so.inc.php    1 Feb 2002 01:47:50 -0000       1.1.2.2
***************
*** 21,30 ****
                function so()
                {
!                       global $phpgw, $phpgw_info;
! 
!                       $this->db             = $phpgw->db;
                        $this->db2            = $this->db;
!                       $this->grants         = $phpgw->acl->get_grants('todo');
!                       $this->owner          = 
$phpgw_info['user']['account_id'];
                        $this->historylog     = 
CreateObject('phpgwapi.historylog','todo');
  
--- 21,28 ----
                function so()
                {
!                       $this->db             = $GLOBALS['phpgw']->db;
                        $this->db2            = $this->db;
!                       $this->grants         = 
$GLOBALS['phpgw']->acl->get_grants('todo');
!                       $this->owner          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->historylog     = 
CreateObject('phpgwapi.historylog','todo');
  
***************
*** 35,45 ****
  /*            function check_record_rights($todo_id, $required_rights)
                {
-                       global $phpgw_info;
- 
                        $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') != $phpgw_info['user']['account_id'])
                        {
                                return False;
--- 33,41 ----
  /*            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;
***************
*** 64,69 ****
                function read_todos($start = 0, $limit = True, $query = '', 
$filter = '', $order = '', $sort = '', $cat_id = '', $tree = '', $parent = '')
                {
-                       global $phpgw;
- 
                        $type = $this->type($tree);
  
--- 60,63 ----
***************
*** 190,195 ****
                function select_todo_list($selected = '')
                {
-                       global $phpgw;
- 
                        $todos = $this->read_todos($start, False, $query, 
$filter, $sort, $order, $cat_id, $tree);
  
--- 184,187 ----
***************
*** 203,213 ****
                                if (! $todos[$i]['title'])
                                {
!                                       $words = split(' 
',$phpgw->strip_html($todos[$i]['descr']));
                                        $title = "$words[0] $words[1] $words[2] 
$words[3] ...";
!                                       $todo_select .= '>' . $title;           
                
                                }
                                else
                                {
!                                       $todo_select .= '>' . 
$phpgw->strip_html($todos[$i]['title']);
                                }
                                $todo_select .= '</option>';
--- 195,205 ----
                                if (! $todos[$i]['title'])
                                {
!                                       $words = split(' 
',$GLOBALS['phpgw']->strip_html($todos[$i]['descr']));
                                        $title = "$words[0] $words[1] $words[2] 
$words[3] ...";
!                                       $todo_select .= '>' . $title;
                                }
                                else
                                {
!                                       $todo_select .= '>' . 
$GLOBALS['phpgw']->strip_html($todos[$i]['title']);
                                }
                                $todo_select .= '</option>';
***************
*** 218,222 ****
                function add_todo($values)
                {
-                       global $phpgw;
                        ob_start();
                        print_r($values);
--- 210,213 ----
***************
*** 224,228 ****
                        ob_end_clean();
  
!                       $phpgw->log->message(array(
                                'text' => 'debug, so add_todo values: %1',
                                'p1'   => $contents,
--- 215,219 ----
                        ob_end_clean();
  
!                       $GLOBALS['phpgw']->log->message(array(
                                'text' => 'debug, so add_todo values: %1',
                                'p1'   => $contents,
***************
*** 230,234 ****
                                'file' => __FILE__
                        ));
!                       $phpgw->log->commit();
  
                        if ($values['parent'] && $values['parent'] != 0)
--- 221,225 ----
                                'file' => __FILE__
                        ));
!                       $GLOBALS['phpgw']->log->commit();
  
                        if ($values['parent'] && $values['parent'] != 0)
***************
*** 255,259 ****
  
                                $this->db->query("update phpgw_todo set 
todo_id_main='" . $this->db2->f('max') . "' "
!                                                               . "where 
todo_id='" . $this->db2->f('max') . "'",__LINE__,__FILE__);
                        }
  
--- 246,250 ----
  
                                $this->db->query("update phpgw_todo set 
todo_id_main='" . $this->db2->f('max') . "' "
!                                       . "where todo_id='" . 
$this->db2->f('max') . "'",__LINE__,__FILE__);
                        }
  
***************
*** 271,275 ****
  
                        $this->db->query("delete from phpgw_todo where 
todo_id='$todo_id' $subdelete and ((todo_access='public' "
!                                                       . "and todo_owner != '" 
. $this->owner . "') or (todo_owner='" . $this->owner . 
"'))",__LINE__,__FILE__);
                        $this->historylog->delete($todo_id);
                        $this->db->transaction_commit();
--- 262,266 ----
  
                        $this->db->query("delete from phpgw_todo where 
todo_id='$todo_id' $subdelete and ((todo_access='public' "
!                               . "and todo_owner != '" . $this->owner . "') or 
(todo_owner='" . $this->owner . "'))",__LINE__,__FILE__);
                        $this->historylog->delete($todo_id);
                        $this->db->transaction_commit();

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.ui.inc.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** class.ui.inc.php    7 Jan 2002 10:50:42 -0000       1.2
--- class.ui.inc.php    1 Feb 2002 01:47:50 -0000       1.2.2.1
***************
*** 3,7 ****
        * phpGroupWare - Todo list                                              
   *
        * http://www.phpgroupware.org                                           
   *
!     * Written by Joseph Engo <address@hidden>                          *
        *            Bettina Gille address@hidden                          *
        * -----------------------------------------------                       
   *
--- 3,7 ----
        * phpGroupWare - Todo list                                              
   *
        * http://www.phpgroupware.org                                           
   *
!       * Written by Joseph Engo <address@hidden>                          *
        *            Bettina Gille address@hidden                          *
        * -----------------------------------------------                       
   *
***************
*** 19,28 ****
                var $public_functions = array
                (
!                       'show_list'     => True,
                        'view'      => True,
                        'add'       => True,
                        'edit'      => True,
!                       'delete'                => True,
!                       'matrix'                => True
                );
  
--- 19,28 ----
                var $public_functions = array
                (
!                       'show_list' => True,
                        'view'      => True,
                        'add'       => True,
                        'edit'      => True,
!                       'delete'    => True,
!                       'matrix'    => True
                );
  
***************
*** 58,62 ****
                        $this->t          = $GLOBALS['phpgw']->template;
                        $this->grants     = 
$GLOBALS['phpgw']->acl->get_grants('todo');
!                       $this->grants[$this->account]   = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
  
                        $this->start      = $this->bo->start;
--- 58,62 ----
                        $this->t          = $GLOBALS['phpgw']->template;
                        $this->grants     = 
$GLOBALS['phpgw']->acl->get_grants('todo');
!                       $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
  
                        $this->start      = $this->bo->start;
***************
*** 121,124 ****
--- 121,127 ----
  // --------------------- nextmatch variable template-declarations 
------------------------
  
+                       $GLOBALS['query']  = $this->query;
+                       $GLOBALS['filter'] = $this->filter;
+ 
                        $left = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->total_records,'&menuaction=todo.ui.show_list');
                        $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->total_records,'&menuaction=todo.ui.show_list');
***************
*** 130,152 ****
  // ------------------------- end nextmatch template 
--------------------------------------
  
!             
$this->t->set_var('cat_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
                        
$this->t->set_var('categories',$this->cats->formated_list('select','all',$this->cat_id,'True'));
!             
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
!             $this->t->set_var('filter_list',$this->nextmatchs->filter(1,1));
!             
$this->t->set_var('search_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
!             $this->t->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
  
!               
$this->t->set_var(sort_status,$this->nextmatchs->show_sort_order($this->sort,'todo_status',$this->order,'/todo/index.php',lang('Status')));
!               
$this->t->set_var(sort_urgency,$this->nextmatchs->show_sort_order($this->sort,'todo_pri',$this->order,'/todo/index.php',lang('Urgency')));
!               
$this->t->set_var(sort_title,$this->nextmatchs->show_sort_order($this->sort,'todo_title',$this->order,'/todo/index.php',lang('title')));
!               
$this->t->set_var(sort_lastupdated,$this->nextmatchs->show_sort_order($this->sort,'todo_startdate',$this->order,'/todo/index.php',lang('start
 date')));
!               
$this->t->set_var(sort_datedue,$this->nextmatchs->show_sort_order($this->sort,'todo_enddate',$this->order,'/todo/index.php',lang('end
 date')));
!               
$this->t->set_var(sort_owner,$this->nextmatchs->show_sort_order($this->sort,'todo_owner',$this->order,'/todo/index.php',lang('created
 by')));
!               $this->t->set_var(h_lang_sub,lang('Add Sub'));
!               $this->t->set_var(h_lang_view,lang('View'));
!               $this->t->set_var(h_lang_edit,lang('Edit'));
!               $this->t->set_var(h_lang_delete,lang('Delete'));
  
  // -------------- end header declaration 
--------------------------------------- 
--- 133,157 ----
  // ------------------------- end nextmatch template 
--------------------------------------
  
!                       
$this->t->set_var('cat_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
                        
$this->t->set_var('categories',$this->cats->formated_list('select','all',$this->cat_id,'True'));
!                       
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
!                       
$this->t->set_var('filter_list',$this->nextmatchs->filter(1,1));
!                       
$this->t->set_var('search_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
!                       
$this->t->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
  
!                       
$this->t->set_var('sort_status',$this->nextmatchs->show_sort_order($this->sort,'todo_status',$this->order,'/todo/index.php',lang('Status')));
!                       
$this->t->set_var('sort_urgency',$this->nextmatchs->show_sort_order($this->sort,'todo_pri',$this->order,'/todo/index.php',lang('Urgency')));
!                       
$this->t->set_var('sort_title',$this->nextmatchs->show_sort_order($this->sort,'todo_title',$this->order,'/todo/index.php',lang('title')));
!                       
$this->t->set_var('sort_lastupdated',$this->nextmatchs->show_sort_order($this->sort,'todo_startdate',$this->order,'/todo/index.php',lang('start
 date')));
!                       
$this->t->set_var('sort_datedue',$this->nextmatchs->show_sort_order($this->sort,'todo_enddate',$this->order,'/todo/index.php',lang('end
 date')));
!                       
$this->t->set_var('sort_owner',$this->nextmatchs->show_sort_order($this->sort,'todo_owner',$this->order,'/todo/index.php',lang('created
 by')));
!                       $this->t->set_var('h_lang_sub',lang('Add Sub'));
!                       $this->t->set_var('h_lang_view',lang('View'));
!                       $this->t->set_var('h_lang_edit',lang('Edit'));
!                       $this->t->set_var('h_lang_delete',lang('Delete'));
! 
!                       $query = $filter = '';
  
  // -------------- end header declaration 
--------------------------------------- 
***************
*** 213,221 ****
                                }
  
! //                            $cached_data = 
$this->bo->cached_accounts($todo_list[$i]['owner']);                     
  
                                $ownerout = $todo_list[$i]['owner']; 
//$phpgw->strip_html($cached_data[$todo_list[$i]['owner']]['account_lid']
! //                                                                            
. ' <' . $cached_data[$todo_list[$i]['owner']]['firstname'] . ' '
! //                                                                            
. $cached_data[$todo_list[$i]['owner']]['lastname'] . '>');
  
  // --------------- template declaration for list records 
-------------------------------------
--- 218,226 ----
                                }
  
! //                            $cached_data = 
$this->bo->cached_accounts($todo_list[$i]['owner']);
  
                                $ownerout = $todo_list[$i]['owner']; 
//$phpgw->strip_html($cached_data[$todo_list[$i]['owner']]['account_lid']
! //                                    . ' <' . 
$cached_data[$todo_list[$i]['owner']]['firstname'] . ' '
! //                                    . 
$cached_data[$todo_list[$i]['owner']]['lastname'] . '>');
  
  // --------------- template declaration for list records 
-------------------------------------
***************
*** 237,241 ****
                                {
                                        $this->t->set_var('edit','<a href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.edit&todo_id=' . 
$todo_list[$i]['id'])
!                                                                               
        . '">' . lang('Edit') . '</a>');
                                }
                                else
--- 242,246 ----
                                {
                                        $this->t->set_var('edit','<a href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.edit&todo_id=' . 
$todo_list[$i]['id'])
!                                               . '">' . lang('Edit') . '</a>');
                                }
                                else
***************
*** 247,251 ****
                                {
                                        $this->t->set_var('delete','<a href="' 
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.delete&todo_id=' . 
$todo_list[$i]['id'])
!                                                                               
                . '">' . lang('Delete') . '</a>');
                                }
                                else
--- 252,256 ----
                                {
                                        $this->t->set_var('delete','<a href="' 
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.delete&todo_id=' . 
$todo_list[$i]['id'])
!                                               . '">' . lang('Delete') . 
'</a>');
                                }
                                else
***************
*** 257,261 ****
                                {
                                        $this->t->set_var('subadd', '<a href="' 
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&parent=' . 
$todo_list[$i]['id']
!                                                                               
                                                . '&cat_id=' . $this->cat_id) . 
'">' . lang('Add Sub') . '</a>');
                                }
                                else
--- 262,266 ----
                                {
                                        $this->t->set_var('subadd', '<a href="' 
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&parent=' . 
$todo_list[$i]['id']
!                                               . '&cat_id=' . $this->cat_id) . 
'">' . lang('Add Sub') . '</a>');
                                }
                                else
***************
*** 279,283 ****
                        {
                                $this->t->set_var('add','<form method="POST" 
action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&cat_id=' . 
$this->cat_id)
!                                                                               
. '"><input type="submit" name="Add" value="' . lang('Add') .'"></form>');
                        }
                        else
--- 284,288 ----
                        {
                                $this->t->set_var('add','<form method="POST" 
action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&cat_id=' . 
$this->cat_id)
!                                       . '"><input type="submit" name="Add" 
value="' . lang('Add') .'"></form>');
                        }
                        else
***************
*** 286,290 ****
                                {
                                        $this->t->set_var('add','<form 
method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&cat_id=' . 
$this->cat_id)
!                                                                               
        . '"><input type="submit" name="Add" value="' . lang('Add') 
.'"></form>');
                                }
                                else
--- 291,295 ----
                                {
                                        $this->t->set_var('add','<form 
method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.add&cat_id=' . 
$this->cat_id)
!                                               . '"><input type="submit" 
name="Add" value="' . lang('Add') .'"></form>');
                                }
                                else
***************
*** 302,306 ****
  
                        
$this->t->set_var('matrixview',$GLOBALS['phpgw']->common->check_owner($this->account,'/index.php',
!                                                               lang('View 
matrix of actual month'),'menuaction=todo.ui.matrix&month=' . $month . '&year=' 
. $year));
  
                        $this->t->pfp('out','todo_list_t',True);
--- 307,311 ----
  
                        
$this->t->set_var('matrixview',$GLOBALS['phpgw']->common->check_owner($this->account,'/index.php',
!                               lang('View matrix of actual 
month'),'menuaction=todo.ui.matrix&month=' . $month . '&year=' . $year));
  
                        $this->t->pfp('out','todo_list_t',True);
***************
*** 382,388 ****
  
                        
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
!                                                                               
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
                        
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
!                                                                               
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
  
                        $this->t->set_var('selfortoday','<input type="checkbox" 
name="values[seltoday]" value="True">');
--- 387,393 ----
  
                        
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
!                               
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
                        
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
!                               
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
  
                        $this->t->set_var('selfortoday','<input type="checkbox" 
name="values[seltoday]" value="True">');
***************
*** 431,435 ****
                        $this->t->set_var('value_completed',$values['status']);
  
- 
                        switch ($values['pri'])
                        {
--- 436,439 ----
***************
*** 462,470 ****
                        }
  
!             if ($submit)
!             {
!                 $values['cat'] = $cat_id;
!                 $values['parent'] = $parent;
!                 $values['id'] = $todo_id;
  
                                $error = $this->bo->check_values($values);
--- 466,474 ----
                        }
  
!                       if ($submit)
!                       {
!                               $values['cat'] = $cat_id;
!                               $values['parent'] = $parent;
!                               $values['id'] = $todo_id;
  
                                $error = $this->bo->check_values($values);
***************
*** 524,528 ****
  
                        
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
!                                                                               
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
  
                        if ($values['edate'] == 0)
--- 528,532 ----
  
                        
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
!                               
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
  
                        if ($values['edate'] == 0)
***************
*** 540,544 ****
  
                        
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
!                                                                               
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
  
                        $this->t->set_var('selfortoday','&nbsp;');
--- 544,548 ----
  
                        
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
!                               
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
  
                        $this->t->set_var('selfortoday','&nbsp;');
***************
*** 646,652 ****
                                                if ($subentries[$j]['sdate'] > 
0 && $subentries[$j]['edate'] > 0)
                                                {
!                                                       $startd = 
date('Y',$subentries[$j]['sdate']) . date('m',$subentries[$j]['sdate']) . 
date('d',$subentries[$j]['sdate']);                                             
           
!                               $endd = date('Y',$subentries[$j]['edate']) . 
date('m',$subentries[$j]['edate']) . date('d',$subentries[$j]['edate']);        
                                                  
!                               
$this->matrix->setPeriod($GLOBALS['phpgw']->strip_html($subentries[$j]['descr']),$startd,$endd,$colors[$ind]);
                                                }
                                        }
--- 650,656 ----
                                                if ($subentries[$j]['sdate'] > 
0 && $subentries[$j]['edate'] > 0)
                                                {
!                                                       $startd = 
date('Y',$subentries[$j]['sdate']) . date('m',$subentries[$j]['sdate']) . 
date('d',$subentries[$j]['sdate']);
!                                                       $endd = 
date('Y',$subentries[$j]['edate']) . date('m',$subentries[$j]['edate']) . 
date('d',$subentries[$j]['edate']);
!                                                       
$this->matrix->setPeriod($GLOBALS['phpgw']->strip_html($subentries[$j]['descr']),$startd,$endd,$colors[$ind]);
                                                }
                                        }
***************
*** 655,659 ****
  
                        
$this->matrix->out($GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.matrix'));
- 
                }
        }
--- 659,662 ----




reply via email to

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