summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Article.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
committerIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
commit3d0a1bb06b895c5be6e3f0517d355442a6b1e125 (patch)
tree84069ebc3254825b952a482e11cdbbbc69f6fe85 /rt/lib/RT/Article.pm
parentf3b99c11d6eed33f467dda360180a698a85c54e8 (diff)
parentd62206a94d9d49ef96640e0a8ec492679f8345e9 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/lib/RT/Article.pm')
-rw-r--r--rt/lib/RT/Article.pm18
1 files changed, 4 insertions, 14 deletions
diff --git a/rt/lib/RT/Article.pm b/rt/lib/RT/Article.pm
index 24b952ad4..ec1ae3cae 100644
--- a/rt/lib/RT/Article.pm
+++ b/rt/lib/RT/Article.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -102,7 +102,7 @@ sub Create {
@_
);
- my $class = RT::Class->new($RT::SystemUser);
+ my $class = RT::Class->new( $self->CurrentUser );
$class->Load( $args{'Class'} );
unless ( $class->Id ) {
return ( 0, $self->loc('Invalid Class') );
@@ -399,9 +399,8 @@ sub AddLink {
# Check that we're actually getting a valid URI
my $uri_obj = RT::URI->new( $self->CurrentUser );
- $uri_obj->FromURI( $args{'Target'}||$args{'Base'} );
- unless ( $uri_obj->Resolver && $uri_obj->Scheme ) {
- my $msg = $self->loc( "Couldn't resolve '[_1]' into a Link.", $args{'Target'} );
+ unless ( $uri_obj->FromURI( $args{'Target'}||$args{'Base'} )) {
+ my $msg = $self->loc( "Couldn't resolve '[_1]' into a Link.", $args{'Target'} || $args{'Base'} );
$RT::Logger->warning( $msg );
return( 0, $msg );
}
@@ -611,15 +610,6 @@ sub CustomFieldLookupType {
"RT::Class-RT::Article";
}
-# _LookupId is the id of the toplevel type object the customfield is joined to
-# in this case, that's an RT::Class.
-
-sub _LookupId {
- my $self = shift;
- return $self->ClassObj->id;
-
-}
-
=head2 LoadByInclude Field Value
Takes the name of a form field from "Include Article"