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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 01 Sep 2003 01:24:20 -0000


albertel		Sun Aug 31 21:24:20 2003 EDT

  Modified files:              
    /doc/loncapafiles	updatequery.piml 
  Log:
  - whilst it doesn't let you modify the new fields in domain.tab, it also no longer erases them. (BUG#1712)
  
  
Index: doc/loncapafiles/updatequery.piml
diff -u doc/loncapafiles/updatequery.piml:1.28 doc/loncapafiles/updatequery.piml:1.29
--- doc/loncapafiles/updatequery.piml:1.28	Fri Aug 29 14:54:52 2003
+++ doc/loncapafiles/updatequery.piml	Sun Aug 31 21:24:20 2003
@@ -1,6 +1,6 @@
 <!-- updatequery.piml -->
 
-<!-- $Id: updatequery.piml,v 1.28 2003/08/29 18:54:52 albertel Exp $ -->
+<!-- $Id: updatequery.piml,v 1.29 2003/09/01 01:24:20 albertel Exp $ -->
 
 <!--
 
@@ -126,6 +126,7 @@
 <perlscript mode='fg'>
 $|=1;
 my $domainDescription;
+my $domainTabExtras;
 unless (-e "<TARGET />") {
   print(&lt;&lt;END);
            WELCOME TO LON-CAPA!
@@ -456,8 +457,9 @@
        open(IN,'&lt;../'.$lonCluster.'_domain.tab');
        while(&lt;IN&gt;) {
           if (/^$perlvar{'lonDefDomain'}\:/) {
-	     (undef,$domainDescription)=split(/:/,$_);
+	     (undef,$domainDescription,$domainTabExtras)=split(/:/,$_,3);
 	     chomp($domainDescription);
+	     chomp($domainTabExtras);
              last;
           }
        }
@@ -467,8 +469,9 @@
        open(IN,'&lt;/home/httpd/lonTabs/domain.tab');
        while(&lt;IN&gt;) {
           if (/^$perlvar{'lonDefDomain'}\:/) {
-	     (undef,$domainDescription)=split(/:/,$_);
+	     (undef,$domainDescription,$domainTabExtras)=split(/:/,$_,3);
 	     chomp($domainDescription);
+	     chomp($domainTabExtras);
              last;
           }
        }
@@ -638,7 +641,7 @@
   $line2insert=&lt;&lt;END;
 $perlvar{'lonHostID'}:$perlvar{'lonDefDomain'}:$perlvar{'lonRole'}:$hostname:$hostaddress
 END
-  $domaininsert="$perlvar{'lonDefDomain'}:$domainDescription\n";
+  $domaininsert="$perlvar{'lonDefDomain'}:$domainDescription:$domainTabExtras\n";
   if ($lonCluster eq 'standalone') {
     open(OUT,'&gt;../'.$lonCluster.'_hosts.tab') or
       die('file generation error');