cvs: pearbot /modules pearcvscommits.php
[email protected] ("Amir Mohammad Saied") Wed, 07 May 2008 10:13:17 -0000
| Newsgroups | php.pear.cvs |
|---|---|
| Message-ID | <cvsamir1210155197@cvsserver> |
amir Wed May 7 10:13:17 2008 UTC
Modified files:
/pearbot/modules pearcvscommits.php
Log:
Replacing full name with handler
http://cvs.php.net/viewvc.cgi/pearbot/modules/pearcvscommits.php?r1=1.3&r2=1.4&diff_format=u
Index: pearbot/modules/pearcvscommits.php
diff -u pearbot/modules/pearcvscommits.php:1.3 pearbot/modules/pearcvscommits.php:1.4
--- pearbot/modules/pearcvscommits.php:1.3 Mon May 5 07:00:25 2008
+++ pearbot/modules/pearcvscommits.php Wed May 7 10:13:17 2008
@@ -1,9 +1,9 @@
<?php
/**
- * $Id: pearcvscommits.php,v 1.3 2008/05/05 07:00:25 amir Exp $
- * $Revision: 1.3 $
+ * $Id: pearcvscommits.php,v 1.4 2008/05/07 10:13:17 amir Exp $
+ * $Revision: 1.4 $
* $Author: amir $
- * $Date: 2008/05/05 07:00:25 $
+ * $Date: 2008/05/07 10:13:17 $
*
* Copyright (c) 2008 Amir Mohammad Saied <[email protected]>
*/
@@ -16,7 +16,7 @@
var $name = 'pearcvscommits';
var $description = 'Will return PEAR CVS commits';
var $author = 'Amir Mohammad Saied <[email protected]>';
- var $version = '$Revision: 1.3 $';
+ var $version = '$Revision: 1.4 $';
var $license = 'GPL';
var $lastMessageID = 0;
@@ -83,9 +83,10 @@
$queueItems = ($lastID - $this->lastMessageID) > $this->maxToPost ?
$this->maxToPost : $lastID - $this->lastMessageID;
while($queueItems) {
+ $matches = "";
$item = $this->parsedFeed['channel']['item'][20 - $queueItems];
- $finalOutput[] = '"'.str_replace(" "," ",
- strip_tags($item['description'])) . '" committed to '.
+ preg_match('/(?<handler>\w+)%40php.net/', $item['description'], $matches);
+ $finalOutput[] = $matches['handler'] . ' committed to '.
str_replace("cvs: ", "", $item['title']) . ' ['.
$item['link'].']';
$queueItems--;