Fix NNTP authentication procedure
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 28 Jul 2007 18:13:19 +0000 (18:13 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:48 +0000 (00:35 +0100)
 nntp.inc.php     |    6 ++----
 nntpcore.inc.php |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@269 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/nntp.inc.php
banana/nntpcore.inc.php

index 9318332..a7f2e5c 100644 (file)
@@ -30,10 +30,8 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
         if (!isset($url['port'])) {
             $url['port'] = 119;
         }
-        if (!isset($url['user'])) {
-            parent::__construct($url['host'], $url['port']);
-        } else {
-            parent::__construct($url['host'], $url['port'], 120, false);
+        parent::__construct($url['host'], $url['port']);
+        if (isset($url['user'])) {
             $this->authinfo($url['user'], $url['pass']);
         }      
     }
index 7579c2a..b6170b8 100644 (file)
@@ -50,7 +50,7 @@ class BananaNNTPCore
         }
 
         $this->checkState();
-        $this->posting = ($this->lastresultcode == '200'); 
+        $this->posting = ($this->lastresultcode == '200');
         if ($reader && $this->posting) {
             $this->execLine('MODE READER');
             $this->posting = ($this->lastresultcode == '200');