More robustness, and some little bug fixes.
[moodle.git] / auth / nntp / config.html
index f949291..453ffb8 100644 (file)
@@ -1,19 +1,28 @@
-<tr valign="top">
+<?PHP
+    if (!isset($config->auth_nntphost)) {
+        $config->auth_nntphost = "127.0.0.1";
+    }
+    if (!isset($config->auth_nntpport)) {
+        $config->auth_nntpport = "119";
+    }
+?>
+
+<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_nntphost:</TD>
        <TD>
         <INPUT name="auth_nntphost" TYPE="text" SIZE=30 VALUE="<?=$config->auth_nntphost?>">
-       <? formerr($err["ldap_nntphost"]); ?>
+       <? if (isset($err["auth_nntphost"]))  formerr($err["auth_nntphost"]); ?>
        </TD>
     <TD>
     <? print_string("auth_nntphost","auth") ?>
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_nntpport:</TD>
        <TD>
-    <INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?=$config->auth_nntpport?>">
-    <? formerr($err["auth_nntpport"]); ?>
+    <INPUT name=auth_nntpport TYPE=text SIZE=6 VALUE="<?=$config->auth_nntpport?>">
+    <? if (isset($err["auth_nntpport"])) formerr($err["auth_nntpport"]); ?>
     </TD>
     <TD>
     <? print_string("auth_nntpport","auth") ?>
@@ -21,7 +30,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>