[Rt-commit] r3271 - in rt/branches/3.4-RELEASE: . lib/RT

alexmv at bestpractical.com alexmv at bestpractical.com
Fri Jul 1 00:32:11 EDT 2005


Author: alexmv
Date: Fri Jul  1 00:32:10 2005
New Revision: 3271

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
 r4556 at zoq-fot-pik:  chmrr | 2005-06-30 17:58:57 -0400
  * Don't assume link is happy on creation


Modified: rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm	Fri Jul  1 00:32:10 2005
@@ -2539,6 +2539,8 @@
 ok ($id,$msg);
 ($id,$msg) =$ticket->AddLink(Type => 'RefersTo', Target => $ticket2->id);
 ok($id,$msg);
+($id,$msg) =$ticket->AddLink(Type => 'RefersTo', Target => -1);
+ok(!$id,$msg);
 
 =end testing 
 
@@ -2587,6 +2589,14 @@
         $other_ticket_uri->FromURI( $args{'Base'} );
     }
 
+    unless ( $other_ticket_uri->Resolver && $other_ticket_uri->Scheme ) {
+	my $msg = $args{'Target'} ? $self->loc("Couldn't resolve target '[_1]' into a URI.", $args{'Target'})
+          : $self->loc("Couldn't resolve base '[_1]' into a URI.", $args{'Base'});
+        $RT::Logger->warning( "$self $msg\n" );
+
+        return( 0, $msg );
+    }
+
     if ( $other_ticket_uri->Resolver->Scheme eq 'fsck.com-rt') {
         my $object = $other_ticket_uri->Resolver->Object;
 


More information about the Rt-commit mailing list