Re: svn: /web/php-bugs/trunk/www/rss/ rss.php
| From: | Paul Dragoonis | Date: | Thu, 30 Jun 2011 00:04:34 +0000 |
| Subject: | Re: svn: /web/php-bugs/trunk/www/rss/ rss.php | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-11378@lists.php.net to get a copy of this message | ||
Felipe, wouldn't a strpos() or stripos() suffice here on the if
statement? Instead of an expensive pcre lookup.
Thanks
Paul.
On Thu, Jun 30, 2011 at 12:40 AM, Felipe Pena <felipe@php.net> wrote:
> felipe Wed, 29 Jun 2011 23:40:12 +0000
>
> Revision:
> http://svn.php.net/viewvc?view=revision&revision=312645
>
> Log:
> - Fix warning
>
> Changed paths:
> U web/php-bugs/trunk/www/rss/rss.php
>
> Modified: web/php-bugs/trunk/www/rss/rss.php
> ===================================================================
> --- web/php-bugs/trunk/www/rss/rss.php 2011-06-29 23:38:29 UTC (rev 312644)
> +++ web/php-bugs/trunk/www/rss/rss.php 2011-06-29 23:40:12 UTC (rev 312645)
> @@ -2,8 +2,8 @@
> echo '<?xml version="1.0"?>';
>
> $desc = "{$bug['package_name']} {$bug['bug_type']}\nReported by
> ";
> -if ($bug['handle']) {
> - $desc .= "{$bug['handle']}\n";
> +if (preg_match('/@php.net$/i', $bug['email'])) {
> + $desc .= substr($bug['email'], 0, strpos($bug['email'],
> '@')) ."\n";
> } else {
> $desc .= substr($bug['email'], 0, strpos($bug['email'],
> '@')) . "@...\n";
> }
>
>
> --
> PHP Webmaster List Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>