cvs: pear(MAINT_0_11) /Net_NNTP/NNTP Client.php /Net_NNTP/NNTP/Protocol Client.php
| From: | Heino H. Gehlsen | Date: | Mon, 30 Aug 2004 19:10:10 +0000 |
| Subject: | cvs: pear(MAINT_0_11) /Net_NNTP/NNTP Client.php /Net_NNTP/NNTP/Protocol Client.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23510@lists.php.net to get a copy of this message | ||
heino Mon Aug 30 15:10:10 2004 EDT
Modified files: (Branch: MAINT_0_11)
/pear/Net_NNTP/NNTP Client.php
/pear/Net_NNTP/NNTP/Protocol Client.php
Log:
'distributions' parameter added to 'newgroups' related methods
http://cvs.php.net/diff.php/pear/Net_NNTP/NNTP/Client.php?r1=1.1.4.8&r2=1.1.4.9&ty=u
Index: pear/Net_NNTP/NNTP/Client.php
diff -u pear/Net_NNTP/NNTP/Client.php:1.1.4.8 pear/Net_NNTP/NNTP/Client.php:1.1.4.9
--- pear/Net_NNTP/NNTP/Client.php:1.1.4.8 Sat Aug 21 08:12:13 2004
+++ pear/Net_NNTP/NNTP/Client.php Mon Aug 30 15:10:09 2004
@@ -58,7 +58,7 @@
// | been changes or removed. |
// | |
// +-----------------------------------------------------------------------+
-// $Id: Client.php,v 1.1.4.8 2004/08/21 12:12:13 heino Exp $
+// $Id: Client.php,v 1.1.4.9 2004/08/30 19:10:09 heino Exp $
require_once 'Net/NNTP/Protocol/Client.php';
require_once 'Net/NNTP/Header.php';
@@ -88,7 +88,7 @@
* @category Net
* @package Net_NNTP
* @author Heino H. Gehlsen <heino@gehlsen.dk>
- * @version $Id: Client.php,v 1.1.4.8 2004/08/21 12:12:13 heino Exp $
+ * @version $Id: Client.php,v 1.1.4.9 2004/08/30 19:10:09 heino Exp $
* @access public
* @see Net_NNTP_Protocol_Client
* @since Class available since Release 0.11.0
@@ -584,7 +584,7 @@
* @access public
* @since 0.3
*/
- function getNewGroups($time)
+ function getNewGroups($time, $distributions = null)
{
switch (gettype($time)) {
case 'integer':
@@ -593,10 +593,10 @@
$time = (int) strtotime($time);
break;
default:
- return PEAR::throwError('');
+ return PEAR::throwError('UPS...');
}
- return $this->cmdNewgroups($time);
+ return $this->cmdNewgroups($time, $distributions);
}
// }}}
http://cvs.php.net/diff.php/pear/Net_NNTP/NNTP/Protocol/Client.php?r1=1.1.4.6&r2=1.1.4.7&ty=u
Index: pear/Net_NNTP/NNTP/Protocol/Client.php
diff -u pear/Net_NNTP/NNTP/Protocol/Client.php:1.1.4.6
pear/Net_NNTP/NNTP/Protocol/Client.php:1.1.4.7
--- pear/Net_NNTP/NNTP/Protocol/Client.php:1.1.4.6 Sun Aug 22 03:34:26 2004
+++ pear/Net_NNTP/NNTP/Protocol/Client.php Mon Aug 30 15:10:09 2004
@@ -58,7 +58,7 @@
// | been changes or removed. |
// | |
// +-----------------------------------------------------------------------+
-// $Id: Client.php,v 1.1.4.6 2004/08/22 07:34:26 heino Exp $
+// $Id: Client.php,v 1.1.4.7 2004/08/30 19:10:09 heino Exp $
require_once 'PEAR.php';
require_once 'Net/Socket.php';
@@ -78,7 +78,7 @@
* @category Net
* @package Net_NNTP
* @author Heino H. Gehlsen <heino@gehlsen.dk>
- * @version $Id: Client.php,v 1.1.4.6 2004/08/22 07:34:26 heino Exp $
+ * @version $Id: Client.php,v 1.1.4.7 2004/08/30 19:10:09 heino Exp $
* @access public
* @see Net_NNTP_Client
* @since Class available since Release 0.11.0
@@ -700,13 +700,14 @@
* Fetches a list of all newsgroups created since a specified date.
*
* @param int $time Last time you checked for groups (timestamp).
+ * @param optional string $distributions
*
* @return mixed (array) nested array with informations about existing newsgroups on success or
(object) pear_error on failure
* @access public
*/
- function cmdNewgroups($time)
+ function cmdNewgroups($time, $distributions = null)
{
- $response = $this->_sendCommand('NEWGROUPS '.date('ymd His',
$time));
+ $response = $this->_sendCommand('NEWGROUPS '.date('ymd His',
$time).' GMT'.($distributions !== null ? ' <'.$distributions.'>'
: ''));
if (PEAR::isError($response)){
return $response;
}