cvs: pear(MAINT_0_10) /Net_NNTP/NNTP Protocol.php Realtime.php

From: Date: Fri, 25 Jun 2004 11:46:22 +0000
Subject: cvs: pear(MAINT_0_10) /Net_NNTP/NNTP Protocol.php Realtime.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-21108@lists.php.net to get a copy of this message
heino Fri Jun 25 07:46:22 2004 EDT Modified files: (Branch: MAINT_0_10) /pear/Net_NNTP/NNTP Protocol.php Realtime.php Log: Minor fix in isConnected() Net_NNTP_Protocol no longer extends PEAR (now uses only static PEAR:: methods). http://cvs.php.net/diff.php/pear/Net_NNTP/NNTP/Protocol.php?r1=1.6.2.1&r2=1.6.2.2&ty=u Index: pear/Net_NNTP/NNTP/Protocol.php diff -u pear/Net_NNTP/NNTP/Protocol.php:1.6.2.1 pear/Net_NNTP/NNTP/Protocol.php:1.6.2.2 --- pear/Net_NNTP/NNTP/Protocol.php:1.6.2.1 Fri Nov 14 03:44:19 2003 +++ pear/Net_NNTP/NNTP/Protocol.php Fri Jun 25 07:46:21 2004 @@ -57,7 +57,7 @@ // | been changes or removed. | // | | // +-----------------------------------------------------------------------+ -// $Id: Protocol.php,v 1.6.2.1 2003/11/14 08:44:19 heino Exp $ +// $Id: Protocol.php,v 1.6.2.2 2004/06/25 11:46:21 heino Exp $ require_once 'PEAR.php'; require_once 'Net/Socket.php'; @@ -68,12 +68,12 @@ /** * The Net_NNTP_Protocol class implements the NNTP standard acording to - * RFX 977, RFC 2980, RFC 850/1036, and RFC 822/2822 + * RFX 977, RFC 2980, RFC 850/1036, and RFC 822/2822 * * @version 0.0.1 * @author Heino H. Gehlsen <heino@gehlsen.dk> */ -class Net_NNTP_Protocol extends PEAR +class Net_NNTP_Protocol { // {{{ properties @@ -100,8 +100,6 @@ * */ function Net_NNTP_Protocol() { - parent::PEAR(); - $this->_socket = new Net_Socket(); } @@ -125,7 +123,7 @@ // Open Connection $R = @$this->_socket->connect($host, $port, false, 15); - if ($this->isError($R)) { + if (PEAR::isError($R)) { return PEAR::throwError('Could not connect to the server', null, $R->getMessage()); } @@ -966,7 +964,7 @@ */ function isConnected() { - return (is_resource($this->_socket->fp) && !feof($this->_socket->fp)); + return (is_resource($this->_socket->fp) && (!$this->_socket->eof())); } // }}} http://cvs.php.net/diff.php/pear/Net_NNTP/NNTP/Realtime.php?r1=1.1&r2=1.1.2.1&ty=u Index: pear/Net_NNTP/NNTP/Realtime.php diff -u pear/Net_NNTP/NNTP/Realtime.php:1.1 pear/Net_NNTP/NNTP/Realtime.php:1.1.2.1 --- pear/Net_NNTP/NNTP/Realtime.php:1.1 Fri Oct 10 09:11:19 2003 +++ pear/Net_NNTP/NNTP/Realtime.php Fri Jun 25 07:46:21 2004 @@ -57,7 +57,7 @@ // | been changes or removed. | // | | // +-----------------------------------------------------------------------+ -// $Id: Realtime.php,v 1.1 2003/10/10 13:11:19 heino Exp $ +// $Id: Realtime.php,v 1.1.2.1 2004/06/25 11:46:21 heino Exp $ require_once 'Net/NNTP/Protocol.php'; require_once 'Net/NNTP/Header.php'; @@ -197,7 +197,7 @@ { // Username is a must... if ($user == null) { - return $this->throwError('No username supplied', null); + return PEAR::throwError('No username supplied', null); } // Use selected authentication method @@ -212,7 +212,7 @@ return $this->cmdAuthinfoGeneric($user, $pass); break; default: - return $this->throwError("The auth mode: '$mode' is unknown", null); + return PEAR::throwError("The auth mode: '$mode' is unknown", null); } } @@ -471,7 +471,8 @@ { $header = $this->getHeaderRaw($article, false); if (PEAR::isError($header)) { - return $header; + return $header +; } $H = Net_NNTP_Header::create($header); @@ -574,7 +575,7 @@ $time = (int) strtotime($time); break; default: - return $this->throwError(''); + return PEAR::throwError(''); } return $this->cmdNewgroups($time);

« previous php.pear.cvs (#21108) next »