[LON-CAPA-cvs] cvs: doc /loncapafiles updatequery.piml

harris41 lon-capa-cvs@mail.lon-capa.org
Fri, 21 Jun 2002 05:30:31 -0000


harris41		Fri Jun 21 01:30:31 2002 EDT

  Modified files:              
    /doc/loncapafiles	updatequery.piml 
  Log:
  BUG FIX for #560; always check user changes of lon-capa host id and domain;
  not just initial entry
  
  
Index: doc/loncapafiles/updatequery.piml
diff -u doc/loncapafiles/updatequery.piml:1.16 doc/loncapafiles/updatequery.piml:1.17
--- doc/loncapafiles/updatequery.piml:1.16	Wed Jun 12 13:07:55 2002
+++ doc/loncapafiles/updatequery.piml	Fri Jun 21 01:30:31 2002
@@ -1,7 +1,7 @@
 <!-- updatequery.piml -->
 <!-- Scott Harrison -->
 
-<!-- $Id: updatequery.piml,v 1.16 2002/06/12 17:07:55 harris41 Exp $ -->
+<!-- $Id: updatequery.piml,v 1.17 2002/06/21 05:30:31 harris41 Exp $ -->
 
 <!--
 
@@ -342,6 +342,7 @@
 # update loncapa.conf until 7 is entered
 
 $flag=0;
+
 while (!$flag) {
   print(&lt;&lt;END);
 
@@ -355,6 +356,30 @@
 6) Server Load: $perlvar{'lonLoadLim'}
 7) Everything is correct up above
 END
+my $hbug=-1;
+my $dbug=-1;
+{
+  my $v=$perlvar{'lonHostID'};
+  $hbug=0;
+  $hbug=1 if $v=~/\W/;
+  $hbug=1 if $v=~/\_/;
+}
+{
+  my $v=$1;
+  $dbug=0;
+  $dbug=1 if $v=~/\W/;
+  $dbug=1 if $v=~/\_/;
+}
+
+if ($hbug) {
+  print "**** ERROR **** ".
+	"Invalid lonHostID (should only be letters and/or digits)\n";
+}
+if ($dbug) {
+  print "**** ERROR **** ".
+	"Invalid lonDefDomain (should only be letters and/or digits)\n";
+}
+
   print(&lt;&lt;END);
 ENTER A CHOICE OF 1-6 TO CHANGE, otherwise ENTER 7:
 END