Diff for /rat/lonuserstate.pm between versions 1.153 and 1.155

version 1.153, 2017/09/03 18:52:23 version 1.155, 2018/03/29 19:59:08
Line 1209  sub readmap { Line 1209  sub readmap {
     }      }
     @cond=('true:normal');      @cond=('true:normal');
   
     unless (open(LOCKFILE,">$fn.db.lock")) {      unless (open(LOCKFILE,">","$fn.db.lock")) {
  #    # 
  # Most likely a permissions problem on the lockfile or its directory.   # Most likely a permissions problem on the lockfile or its directory.
  #   #
Line 1227  sub readmap { Line 1227  sub readmap {
         &unlink_tmpfiles($fn);          &unlink_tmpfiles($fn);
     }      }
     undef %randompick;      undef %randompick;
       undef %randompickseed;
       undef %randomorder;
     undef %hiddenurl;      undef %hiddenurl;
     undef %encurl;      undef %encurl;
     $retfrid='';      $retfrid='';
Line 1370  sub readmap { Line 1372  sub readmap {
             $lock=1;              $lock=1;
         }          }
         undef %randompick;          undef %randompick;
           undef %randompickseed;
           undef %randomorder;
         undef %hiddenurl;          undef %hiddenurl;
         undef %encurl;          undef %encurl;
         $errtext='';          $errtext='';
Line 1522  sub build_tmp_hashes { Line 1526  sub build_tmp_hashes {
 # ---------------------------------------------------- Store away initial state  # ---------------------------------------------------- Store away initial state
     {      {
         my $cfh;          my $cfh;
         if (open($cfh,">$fn.state")) {          if (open($cfh,">","$fn.state")) {
             print $cfh join("\n",@cond);              print $cfh join("\n",@cond);
             $gotstate = 1;              $gotstate = 1;
         } else {          } else {
Line 1559  sub evalstate { Line 1563  sub evalstate {
     if (-e $fn) {      if (-e $fn) {
  my @conditions=();   my @conditions=();
  {   {
     open(my $fh,"<$fn");      open(my $fh,"<",$fn);
     @conditions=<$fh>;      @conditions=<$fh>;
             close($fh);              close($fh);
  }     }  

Removed from v.1.153  
changed lines
  Added in v.1.155


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>