Diff for /doc/loncapafiles/updatequery.piml between versions 1.53 and 1.54

version 1.53, 2007/04/20 18:08:57 version 1.54, 2007/04/20 18:14:26
Line 47  $|=1; Line 47  $|=1;
 *********************************************  *********************************************
   
 END  END
 sleep(3);  #sleep(3);
 </perlscript>  </perlscript>
 </file>  </file>
 <file>  <file>
Line 705  This is now the current configuration of Line 705  This is now the current configuration of
 12) Everything is correct up above  12) Everything is correct up above
 END  END
   
 my $error='';  my @error;
 foreach my $v ($perlvar{'lonDefDomain'},$perlvar{'lonHostID'}) {  foreach my $v ($perlvar{'lonDefDomain'},$perlvar{'lonHostID'}) {
    if (length($v)>35) { $error.="\nName $v too long"; }     if (length($v)>35) { $error.="\nName $v too long"; }
    if (length($v)<2) { $error.="\nName $v too short"; }     if (length($v)<2) { $error.="\nName $v too short"; }
    if ($v=~/capa/i) {     if ($v=~/capa/i) {
  if ($v!~/^oucapa\d+$/ &&    if ($v!~/^oucapa\d+$/ && 
     ($v!~/^capa\d+$/ && $perlvar{'lonDefDomain'} eq 'uwsp')) {      ($v!~/^capa\d+$/ && $perlvar{'lonDefDomain'} eq 'uwsp')) {
  $error.="\nName $v contains 'capa'";    push(@error,"Name $v contains 'capa'");
  }   }
    }     }
    foreach my $bad ('res','raw','userfiles','priv','adm','uploaded',     foreach my $bad ('res','raw','userfiles','priv','adm','uploaded',
  'editupload') {   'editupload') {
       $error.="\nName $v reserved." if $v eq $bad;        push(@error,"\nName $v reserved.") if $v eq $bad;
    }     }
    if ($v=~/[^\w\-.]/) { $error.="\nName $v contains special characters"; }     if ($v=~/[^\w\-.]/) { push(@error,"Name $v contains special characters"); }
 }  }
 if ($domainDescription =~ /^\s*$/) {  if ($domainDescription =~ /^\s*$/) {
    $error.="\nDomain Description is blank.";     push(@error,"Domain Description is blank.");
 } elsif ($domainDescription!~/^[\(\)\-\w\s,]+$/) {  } elsif ($domainDescription!~/^[\(\)\-\w\s,]+$/) {
    $error.="\nDomain Description contains special characters.";     push(@error,"Domain Description contains special characters.");
 }   } 
 foreach my $v ($perlvar{'lonExpire'},$perlvar{'lonLoadLim'}) {  foreach my $v ($perlvar{'lonExpire'},$perlvar{'lonLoadLim'}) {
    unless ($v=~/^[\d+\.]+$/) { $error.="\nNumber expected instead of $v"; }     unless ($v=~/^[\d+\.]+$/) { push(@error,"Number expected instead of $v"); }
 }  }
 unless (($perlvar{'lonRole'} eq 'library') || ($perlvar{'lonRole'} eq 'access')) {  unless (($perlvar{'lonRole'} eq 'library') || ($perlvar{'lonRole'} eq 'access')) {
    $error.="\nInvalid Role";     push(@error,"Invalid Role");
 }  }
   
 if (!defined($primaryLibServer)) {  if (!defined($primaryLibServer)) {
    if (@libservers > 0) {     if (@libservers > 0) {
        $error .= "No primary library server ID designated. Choose from: ".join(',',sort(@libservers));         push(@error,"No primary library server ID designated. Choose from: ".join(',',sort(@libservers)));
    } else {     } else {
        $error .= "No library servers in this domain (including current server)";         push(@error,"No library servers in this domain (including current server)");
    }     }
 } else {  } else {
    if (length($primaryLibServer)>35) { $error.="\nPrimary Library Server ID:  $primaryLibServer too long"; }     if (length($primaryLibServer)>35) { push(@error,"Primary Library Server ID:  $primaryLibServer too long"); }
    if (length($primaryLibServer)<2) { $error.="\nPrimary Library Server ID:  $primaryLibServer too short"; }     if (length($primaryLibServer)<2) { push(@error,"Primary Library Server ID:  $primaryLibServer too short"); }
    if ($primaryLibServer =~/capa/i) {     if ($primaryLibServer =~/capa/i) {
         if ($primaryLibServer!~/^oucapa\d+$/ &&          if ($primaryLibServer!~/^oucapa\d+$/ &&
             ($primaryLibServer!~/^capa\d+$/ && $perlvar{'lonDefDomain'} eq 'uwsp')) {              ($primaryLibServer!~/^capa\d+$/ && $perlvar{'lonDefDomain'} eq 'uwsp')) {
                  $error.="\nPrimary library server ID $primaryLibServer contains 'capa'";                   push(@error,"Primary library server ID $primaryLibServer contains 'capa'")
         }          }
    }     }
    foreach my $bad ('res','raw','userfiles','priv','adm','uploaded',     foreach my $bad ('res','raw','userfiles','priv','adm','uploaded',
         'editupload') {          'editupload') {
       $error.="\nPrimary library server ID $primaryLibServer reserved." if $primaryLibServer eq $bad;        push(@error,"Primary library server ID $primaryLibServer reserved.") if $primaryLibServer eq $bad;
    }     }
    if ($primaryLibServer=~/[^\w\-.]/) { $error.="\nPrimary library server ID $primaryLibServer contains special characters"; }     if ($primaryLibServer=~/[^\w\-.]/) { push(@error,"Primary library server ID $primaryLibServer contains special characters"); }
 }  }
   
   
 if ($error) { print "\n*** ERRORS: $error\n"; }  if (@error) { print "\n*** ERRORS: \n\t".join("\n\t",@error)."\n"; }
   print(&lt;&lt;END);    print(&lt;&lt;END);
 ENTER A CHOICE OF 1-11 TO CHANGE, otherwise ENTER 12:  ENTER A CHOICE OF 1-11 TO CHANGE, otherwise ENTER 12:
 END  END

Removed from v.1.53  
changed lines
  Added in v.1.54


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