Default port for nntps is 563
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 6 May 2011 19:47:52 +0000 (21:47 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 6 May 2011 19:47:52 +0000 (21:47 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
banana/nntp.inc.php

index f352292..a880dd0 100644 (file)
@@ -26,14 +26,16 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
         $url = parse_url(Banana::$nntp_host);
         if ($url['scheme'] == 'nntps' || $url['scheme'] == 'snntp') {
             $url['host'] = 'ssl://' . $url['host'];
-        }
-        if (!isset($url['port'])) {
+            if (!isset($url['port'])) {
+                $url['port'] = 563;
+            }
+        } else if (!isset($url['port'])) {
             $url['port'] = 119;
         }
         parent::__construct($url['host'], $url['port']);
         if (isset($url['user'])) {
             $this->authinfo($url['user'], $url['pass']);
-        }      
+        }
     }
 
     /** Return the descript;ion of the current box