phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: sync/inc class.todo_base.inc.php,1.1,1.2


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sync/inc class.todo_base.inc.php,1.1,1.2
Date: Mon, 05 May 2003 03:46:21 -0400

Update of /cvsroot/phpgroupware/sync/inc
In directory subversions:/tmp/cvs-serv23213/inc

Modified Files:
        class.todo_base.inc.php 
Log Message:
getting closer

Index: class.todo_base.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sync/inc/class.todo_base.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.todo_base.inc.php     4 May 2003 09:00:56 -0000       1.1
--- class.todo_base.inc.php     5 May 2003 07:46:18 -0000       1.2
***************
*** 16,20 ****
      */
  
!               class notes_base
                {
                        var $implementation; //type of implementation in non 
abstract class
--- 16,20 ----
      */
  
!               class todo_base
                {
                        var $implementation; //type of implementation in non 
abstract class
***************
*** 25,29 ****
                        var $notes;  //container for bo notes object
  
!                       function notes_base()
                        {
                                /* This will be uncommented soon 
--- 25,29 ----
                        var $notes;  //container for bo notes object
  
!                       function todo_base()
                        {
                                /* This will be uncommented soon 
***************
*** 34,38 ****
                                }*/
                                $this->common = createObject('sync.common_' . 
$this->implementation);
!                               $this->notes = createObject('notes.bo');
                        }
                        
--- 34,38 ----
                                }*/
                                $this->common = createObject('sync.common_' . 
$this->implementation);
!                               $this->notes = createObject('todo.bo');
                        }
                        
***************
*** 45,49 ****
                        {
                                $lastmod = (int) ( (bool) $get_all ? 0 : 
$this->common->lastsync); 
!                               $dirty_recs = $this->notes->_list('', '', '', 
'', $lastmod);
                                foreach($dirty_recs as $rec_id => $rec_vals)
                                {
--- 45,49 ----
                        {
                                $lastmod = (int) ( (bool) $get_all ? 0 : 
$this->common->lastsync); 
!                               $dirty_recs = $this->todo->_list(0,'', '', '', 
'','', 0, '', '', -1);
                                foreach($dirty_recs as $rec_id => $rec_vals)
                                {
***************
*** 66,83 ****
                        /*!
                        * @function phpgw_add
!                       * @abstract add a new record to the phpgw notes 
repository
!                       * @param $note - notes content
!                       * @param $public - boolean - is record public?
!                       * @param $cat - mapped category_id to be used 
!                       */
!                       function phpgw_add($note, $public=true, 
$category_id='', $remote_id)
!                       {
!                               $note['access']  = (bool) $public;
!                               $note['content'] = $note;
!                               $note['category']= (int) $category_id;
! 
!                               $remote_id = (int) $remote_id;
                                
!                               $phpgw_id = $this->notes->save($note);
                                $this->common->update_match($phpgw_id, 
$remote_id, PHPGW_SYNC_STATUS_ACTIVE);
                        }
--- 66,78 ----
                        /*!
                        * @function phpgw_add
!                       * @abstract add a new record to the phpgw todo 
repository
!                       * @param $todo - todo content - $todo['id'] is the id 
for the todo item on other system
!                       */
!                       function phpgw_add($todo)
!                       {
!                               $remote_id = $todo['id'];
!                               unset($todo['id']);
                                
!                               $phpgw_id = $this->todo->save($todo);
                                $this->common->update_match($phpgw_id, 
$remote_id, PHPGW_SYNC_STATUS_ACTIVE);
                        }
***************
*** 113,122 ****
                        * @function phpgw_update
                        * @abstract update an exiting record in the phpgw notes 
repository - it will add it if it doesn't exist
!                       * @param $note - contents of note
!                       * @param $public - boolean - is record public?
!                       * @param $cat - mapped category_id to be used
!                       * @params $ids - array of ids - phpgw and remote
                        */
!                       function phpgw_update($note, $public=true, 
$category_id='', $ids)
                        {
                                $remote_id = (int) $ids['remote'];
--- 108,114 ----
                        * @function phpgw_update
                        * @abstract update an exiting record in the phpgw notes 
repository - it will add it if it doesn't exist
!                       * @param $todo - todo content - $todo['id'] is the id 
for the todo item on other system
                        */
!                       function phpgw_update($todo)
                        {
                                $remote_id = (int) $ids['remote'];
***************
*** 129,137 ****
                                if($status == PHPGW_SYNC_STATUS_ACTIVE)//all 
others are irrelevant
                                {
-                                       $note['id']                     = (int) 
$ids['phpgw'];
-                                       $note['access']         = (bool) 
$public;
-                                       $note['content']        = $note;
-                                       $note['category']       = (int) 
$category_id;
-                               
                                $phpgw_id = $this->notes->save($note);
                                $this->common->update_match($phpgw_id, 
$remote_id, PHPGW_SYNC_STATUS_ACTIVE);
--- 121,124 ----





reply via email to

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