phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php, 1.20.2.3, 1.20


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php, 1.20.2.3, 1.20.2.4
Date: Thu, 21 Aug 2003 05:33:23 -0400

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

Modified Files:
      Tag: Version-0_9_16-branch
        class.bolink.inc.php 
Log Message:
fix to delete all links to app/id if title(app,id) returns False, app/id has 
been deleted
This helps to deal with not link-aware apps which does not delete the links 
when they delete an entry


Index: class.bolink.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.bolink.inc.php,v
retrieving revision 1.20.2.3
retrieving revision 1.20.2.4
diff -C2 -r1.20.2.3 -r1.20.2.4
*** class.bolink.inc.php        20 Aug 2003 18:10:50 -0000      1.20.2.3
--- class.bolink.inc.php        21 Aug 2003 09:33:21 -0000      1.20.2.4
***************
*** 328,332 ****
                                return $this->delete_attached($app,$id,$id2);
                        }
!                       if ($link_id > 0 || !is_array($id))
                        {
                                return 
solink::unlink($link_id,$app,$id,$owner,$app2,$id2);
--- 328,332 ----
                                return $this->delete_attached($app,$id,$id2);
                        }
!                       if (!is_array($id))
                        {
                                return 
solink::unlink($link_id,$app,$id,$owner,$app2,$id2);
***************
*** 389,393 ****
                @author ralfbecker
                @abstract returns the title (short description) of entry $id 
and $app
!               @result the title
                */
                function title($app,$id,$link='')
--- 389,393 ----
                @author ralfbecker
                @abstract returns the title (short description) of entry $id 
and $app
!               @result the title or false if $id does not exist in $app
                */
                function title($app,$id,$link='')
***************
*** 428,432 ****
                        $method = $reg['title'];
  
!                       return strchr($method,'.') ? ExecMethod($method,$id) : 
$this->$method($id);
                }
  
--- 428,439 ----
                        $method = $reg['title'];
  
!                       $title = strchr($method,'.') ? ExecMethod($method,$id) 
: $this->$method($id);
! 
!                       if (!$title)    // $app,$id has been deleted ==> unlink 
als links to it
!                       {
!                               $this->unlink(0,$app,$id);
!                               return False;
!                       }
!                       return $title;
                }
  
***************
*** 824,828 ****
                        if (!is_array($event))
                        {
!                               return 'not an event !!!';
                        }
                        $format = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] . ' '.
--- 831,835 ----
                        if (!is_array($event))
                        {
!                               return False;
                        }
                        $format = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] . ' '.
***************
*** 879,882 ****
--- 886,893 ----
                                list( $addr ) = 
$this->contacts->read_single_entry( $addr );
                        }
+                       if (!is_array($addr))
+                       {
+                               return False;
+                       }
                        $name = $addr['n_family'];
                        if ($addr['n_given'])
***************
*** 937,941 ****
                                $proj = $this->boprojects->read_single_project( 
$proj );
                        }
!                       return $proj['title'];
                }
  
--- 948,952 ----
                                $proj = $this->boprojects->read_single_project( 
$proj );
                        }
!                       return is_array($proj) ? $proj['title'] : False;
                }
  





reply via email to

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