import of rt 3.0.9
[freeside.git] / rt / lib / RT / URI.pm
index 7acc1dc..337a356 100644 (file)
@@ -91,8 +91,10 @@ sub FromObject {
 
 =head2 FromURI <URI>
 
 
 =head2 FromURI <URI>
 
-Returns a local object id for this content.  You are expected to know what sort of object this is the Id 
-of 
+Returns a local object id for this content. You are expected to know
+what sort of object this is the Id of
+
+Returns true if everything is ok, otherwise false
 
 =cut
 
 
 =cut
 
@@ -119,9 +121,12 @@ sub FromURI {
     
     unless ($self->Resolver->ParseURI($uri)) {
         $RT::Logger->warning("Resolver ".ref($self->Resolver)." could not parse $uri");
     
     unless ($self->Resolver->ParseURI($uri)) {
         $RT::Logger->warning("Resolver ".ref($self->Resolver)." could not parse $uri");
+        $self->{resolver} = undef; # clear resolver
        return (undef);
     }
 
        return (undef);
     }
 
+return(1);
+
 }
 
 # }}}
 }
 
 # }}}