phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/inc class.boinfolog.inc.php,1.26,1.27 cl


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/inc class.boinfolog.inc.php,1.26,1.27 class.solink.inc.php,1.8,1.9 class.uiinfolog.inc.php,1.52,1.53
Date: Fri, 18 Oct 2002 16:20:38 -0400

Update of /cvsroot/phpgroupware/infolog/inc
In directory subversions:/tmp/cvs-serv1440

Modified Files:
        class.boinfolog.inc.php class.solink.inc.php 
        class.uiinfolog.inc.php 
Log Message:
some fixes to get the links working in case the entry is not yet created

Index: class.boinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.boinfolog.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** class.boinfolog.inc.php     17 Oct 2002 22:02:44 -0000      1.26
--- class.boinfolog.inc.php     18 Oct 2002 20:20:34 -0000      1.27
***************
*** 180,184 ****
                }
  
!               function write($values)
                {
                        while (list($key,$val) = each($values))
--- 180,184 ----
                }
  
!               function write($values,$check_defaults=True)
                {
                        while (list($key,$val) = each($values))
***************
*** 190,208 ****
                                }
                        }
!                       if ($values['info_responsible'] && 
$values['info_status'] == 'offer')
                        {
!                               $values['info_status'] = 'ongoing';   // have 
to match if not finished
!                       }
!                       if (!$values['info_id'] && !$values['info_owner'])
!                       {
!                               $values['info_owner'] = $this->so->user;
!                       }
!                       if (!$values['info_subject'])
!                       {
!                               $values['info_subject'] = 
substr($values['info_des'],0,60).' ...';
!                       }
!                       if ($values['info_link_id'] && $values['info_from'] == 
'')
!                       {
!                               $values['info_from'] = 
$this->link_id2title($values);
                        }
                        $values['info_datemodified'] = time();
--- 190,211 ----
                                }
                        }
!                       if ($check_defaults)
                        {
!                               if ($values['info_responsible'] && 
$values['info_status'] == 'offer')
!                               {
!                                       $values['info_status'] = 'ongoing';   
// have to match if not finished
!                               }
!                               if (!$values['info_id'] && 
!$values['info_owner'])
!                               {
!                                       $values['info_owner'] = $this->so->user;
!                               }
!                               if (!$values['info_subject'])
!                               {
!                                       $values['info_subject'] = 
substr($values['info_des'],0,60).' ...';
!                               }
!                               if ($values['info_link_id'] && 
$values['info_from'] == '')
!                               {
!                                       $values['info_from'] = 
$this->link_id2title($values);
!                               }
                        }
                        $values['info_datemodified'] = time();

Index: class.solink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.solink.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.solink.inc.php        17 Oct 2002 23:32:14 -0000      1.8
--- class.solink.inc.php        18 Oct 2002 20:20:35 -0000      1.9
***************
*** 62,66 ****
                function link( 
$app1,$id1,$app2,$id2,$remark='',$owner=0,$lastmod=0 )
                {
!                       if ($this->debug)
                        {
                                echo 
"<p>solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n";
--- 62,66 ----
                function link( 
$app1,$id1,$app2,$id2,$remark='',$owner=0,$lastmod=0 )
                {
!                       //if ($this->debug)
                        {
                                echo 
"<p>solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n";
***************
*** 168,171 ****
--- 168,175 ----
                function get_link($app_link_id,$id='',$app2='',$id2='')
                {
+                       if ($this->debug)
+                       {
+                               echo 
"<p>solink.get_link('$app_link_id',$id,'$app2','$id2')</p>\n";
+                       }
                        $sql = "SELECT * FROM $this->db_name WHERE ";
                        if (intval($app_link_id) > 0)
***************
*** 186,189 ****
--- 190,197 ----
                        if ($this->db->next_record())
                        {
+                               if ($this->debug)
+                               {
+                                       _debug_array($this->db->Record);
+                               }
                                return $this->db->Record;
                        }

Index: class.uiinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.uiinfolog.inc.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -r1.52 -r1.53
*** class.uiinfolog.inc.php     17 Oct 2002 22:02:44 -0000      1.52
--- class.uiinfolog.inc.php     18 Oct 2002 20:20:35 -0000      1.53
***************
*** 144,148 ****
                        $referer = is_array($values) ? $values['referer'] : 
$referer;
                        //echo 
"<p>uiinfolog::index(action='$action/$action_id',referer='$referer/$values[referer]')</p>\n";
-                       
                        if (!is_array($values))
                        {
--- 144,147 ----
***************
*** 263,266 ****
--- 262,266 ----
                        if (is_array($content))
                        {
+                               //echo "uiinfolog::edit: content="; 
_debug_array($content);
                                $info_id   = $content['info_id'];
                                $action    = $content['action'];
***************
*** 272,276 ****
                                        $content['info_link_id'] = 
$content['link_to']['primary'];
                                }
!                               if 
(!$this->link->get_link($content['info_link_id']))
                                {
                                        $content['info_link_id'] = 0;   // link 
has been deleted
--- 272,276 ----
                                        $content['info_link_id'] = 
$content['link_to']['primary'];
                                }
!                               if (intval($content['info_link_id']) > 0 && 
!$this->link->get_link($content['info_link_id']))
                                {
                                        $content['info_link_id'] = 0;   // link 
has been deleted
***************
*** 289,302 ****
                                                if (!$info_id && 
is_array($content['link_to']['to_id']))        // writing link for new entry
                                                {
!                                                       $info_id = 
$this->bo->so->data['info_id'];
!                                                       
$this->link->link('infolog',$info_id,$content['link_to']['to_id']);
                                                        if 
(strstr($content['info_link_id'],':') !== False)
                                                        {
                                                                list($app,$id) 
= explode(':',$content['info_link_id']);
!                                                               
$content['info_link_id'] = $this->link->get_link('info_log',$info_id,$app,$id);
                                                                
$this->bo->write(array(
!                                                                       
'info_id' => $info_id,
!                                                                       
'info_link_id' => $content['info_link_id']
!                                                               ));
                                                        }
                                                }
--- 289,309 ----
                                                if (!$info_id && 
is_array($content['link_to']['to_id']))        // writing link for new entry
                                                {
!                                                       $content['info_id'] = 
$this->bo->so->data['info_id'];
!                                                       
$this->link->link('infolog',$content['info_id'],$content['link_to']['to_id']);
                                                        if 
(strstr($content['info_link_id'],':') !== False)
                                                        {
                                                                list($app,$id) 
= explode(':',$content['info_link_id']);
!                                                               $link = 
$this->link->get_link('infolog',$content['info_id'],$app,$id);
!                                                               
$content['info_link_id'] = $link['link_id'];
! 
!                                                               if 
($content['info_from'] == '')
!                                                               {
!                                                                       
$content['info_from'] = $this->bo->link_id2title($content);
!                                                               }
                                                                
$this->bo->write(array(
!                                                                       
'info_id' => $content['info_id'],
!                                                                       
'info_link_id' => $content['info_link_id'],
!                                                                       
'info_from' => $content['info_from']
!                                                               ),False);
                                                        }
                                                }





reply via email to

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