X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FCondition%2FUserDefined.pm;h=f339e9a80a466c962810b2a2deedcda958e6ff98;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hp=0cb8bdb38e8758187ce1019979393f8ace71df6f;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de;p=freeside.git diff --git a/rt/lib/RT/Condition/UserDefined.pm b/rt/lib/RT/Condition/UserDefined.pm index 0cb8bdb38..f339e9a80 100644 --- a/rt/lib/RT/Condition/UserDefined.pm +++ b/rt/lib/RT/Condition/UserDefined.pm @@ -1,8 +1,8 @@ -# {{{ BEGIN BPS TAGGED BLOCK +# BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: -# -# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -42,16 +44,11 @@ # works based on those contributions, and sublicense and distribute # those contributions and any derivatives thereof. # -# }}} END BPS TAGGED BLOCK - +# END BPS TAGGED BLOCK }}} package RT::Condition::UserDefined; - -use RT::Condition::Generic; - +use base 'RT::Condition'; use strict; -use vars qw/@ISA/; -@ISA = qw(RT::Condition::Generic); =head2 IsApplicable @@ -62,6 +59,7 @@ This happens on every transaction. it's always applicable sub IsApplicable { my $self = shift; + local $@; my $retval = eval $self->ScripObj->CustomIsApplicableCode; if ($@) { $RT::Logger->error("Scrip ".$self->ScripObj->Id. " IsApplicable failed: ".$@);