Changeset 1171 for trunk/gsdl/cgi-bin


Ignore:
Timestamp:
2000-05-12T17:08:42+12:00 (24 years ago)
Author:
sjboddie
Message:

more changes to try to get end-user collection building working
under windows

Location:
trunk/gsdl/cgi-bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/GSDLHOME.pm

    r1157 r1171  
    33BEGIN {
    44
    5     $ENV{'GSDLHOME'} = '**GSDLHOME**' unless defined $ENV{'GSDLHOME'};
     5    if (!defined $ENV{'GSDLHOME'}) {
     6    # read gsdlhome from gsdlsite.cfg
     7    open (GSDLSITE, "gsdlsite.cfg") || die
     8        "GSDLHOME.pm: unable to open gsdlsite.cfg\n";
     9    my $line = "";
     10    while (defined ($line = <GSDLSITE>)) {
     11        if ($line =~ /^gsdlhome\s+(.*?)\s*$/) {
     12        $ENV{'GSDLHOME'} = $1;
     13        last;
     14        }
     15    }
     16    die "GSDLHOME.pm: couldn't find gsdlhome field in gsdlsite.cfg\n"
     17        unless defined $ENV{'GSDLHOME'};
     18    }
    619
    720    # just in case GSDLHOME has a slash on the end which would cause
  • trunk/gsdl/cgi-bin/webpage_mkcol.pl

    r1145 r1171  
    3030use CGI;
    3131use GSDLHOME;
    32 use Fcntl ':flock';
     32#use Fcntl ':flock';
    3333
    3434require util;
     
    4141    my %args = ();
    4242   
     43    open (FILE, '>d:\gsdl\logout.txt') || die;
     44
    4345    foreach $p ($cgi->param())
    4446    {
    4547    $args{$p} = $cgi->param($p);
    46     }
    47 
     48
     49    print FILE "webpage_mkcol.pl - $p -> $args{$p}\n";
     50    }
     51
     52    close FILE;
    4853    return \%args;
    4954}
     
    8590    else
    8691    {
    87     # clean up input for heuristic that derives directory name for a new collection
     92    # clean up input for heuristic that derives directory name for a
     93    # new collection
    8894    $fullname =~ s/\s+/ /g;
    8995    $fullname =~ tr/[A-Z]/[a-z]/;
     
    160166### $cmd .= " -refine  \"$refine_plugs\"";
    161167    $cmd .= " $unique_dirname";
     168
    162169    my $status = system($cmd);
    163170    $status /= 256;
     
    172179        if (open(CFGAPP,">>$cfg_filename"))
    173180        {
    174         if (flock(CFGAPP,LOCK_EX))
    175         {
     181#       if (flock(CFGAPP,LOCK_EX))
     182#       {
    176183            print CFGAPP "\n";
    177184
     
    184191            print CFGAPP "building\tcopydir\t\t$copy_dir\n";
    185192            print CFGAPP "building\tingsdlarea\t$in_gsdl_area\n";
    186             flock(CFGAPP,LOCK_UN);
     193#           flock(CFGAPP,LOCK_UN);
    187194            close(CFGAPP);
    188         }
    189         else
    190         {
     195#       }
     196#       else
     197#       {
    191198            # problem locking file
    192             my $mess = "Unable to lock collection";
    193             $mess .= " configuration file: $cfg_filename";
    194             &webpageutil::error_location($args,$mess);
    195             close(CFGAPP);
    196             return;
    197         }
     199#           my $mess = "Unable to lock collection";
     200#           $mess .= " configuration file: $cfg_filename";
     201#           &webpageutil::error_location($args,$mess);
     202#           close(CFGAPP);
     203#           return;
     204#       }
    198205        }
    199206        else
     
    212219        if (open(CLAPP,">>$collist_filename"))
    213220        {
    214         if (flock(CLAPP,LOCK_EX))
    215         {
     221#       if (flock(CLAPP,LOCK_EX))
     222#       {
    216223            print CLAPP "$unique_dirname\n";
    217             flock(CLAPP,LOCK_UN);
     224#           flock(CLAPP,LOCK_UN);
    218225            close(CLAPP);
    219         }
    220         else
    221         {
     226#       }
     227#       else
     228#       {
    222229            # problem locking file
    223             my $mess = "Unable to lock collection list";
    224             $mess .= " configuration file: $collist_filename";
    225             &webpageutil::error_location($args,$mess);
    226             close(CLAPP);
    227             return;
    228         }
     230#           my $mess = "Unable to lock collection list";
     231#           $mess .= " configuration file: $collist_filename";
     232#           &webpageutil::error_location($args,$mess);
     233#           close(CLAPP);
     234#           return;
     235#       }
    229236        }
    230237        else
Note: See TracChangeset for help on using the changeset viewer.