From: x2003bruneau Date: Sat, 28 Jul 2007 18:13:19 +0000 (+0000) Subject: Fix NNTP authentication procedure X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6ebec9e2740d5708873bbea84947d2f168515abb;p=banana.git Fix NNTP authentication procedure 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 --- diff --git a/banana/nntp.inc.php b/banana/nntp.inc.php index 9318332..a7f2e5c 100644 --- a/banana/nntp.inc.php +++ b/banana/nntp.inc.php @@ -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']); } } diff --git a/banana/nntpcore.inc.php b/banana/nntpcore.inc.php index 7579c2a..b6170b8 100644 --- a/banana/nntpcore.inc.php +++ b/banana/nntpcore.inc.php @@ -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');