More robustness, and some little bug fixes.
[moodle.git] / auth / nntp / config.html
index 5b4375e..453ffb8 100644 (file)
@@ -1,8 +1,17 @@
+<?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") ?>
@@ -12,8 +21,8 @@
 <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") ?>