Changeset 14735


Ignore:
Timestamp:
2007-10-26T16:31:09+13:00 (17 years ago)
Author:
shaoqun
Message:

make it check whether the custom directory is needed to be checked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugout.pm

    r14660 r14735  
    5353       
    5454    # find the plugout
    55     my $customplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'},
    56                          'perllib', 'plugouts', "${plugoutname}.pm");
     55    my $customplugname;
     56    if (defined($ENV{'GSDLCOLLECTION'}))
     57    {
     58        $customplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'},
     59                         'perllib', 'plugouts', "${plugoutname}.pm");
     60    }
     61
    5762    my $colplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, 'perllib', 'plugouts',
    5863                      "${plugoutname}.pm");
    5964    my $mainplugname = &util::filename_cat($ENV{'GSDLHOME'}, 'perllib', 'plugouts',
    6065                      "${plugoutname}.pm");
    61     if (-e $customplugname) { require $customplugname; }
     66    if (defined($customplugname) && -e $customplugname) { require $customplugname; }
    6267    elsif (-e $colplugname) { require $colplugname; }
    6368    elsif (-e $mainplugname) { require $mainplugname; }
Note: See TracChangeset for help on using the changeset viewer.