Re: svn: /web/php-master/trunk/ entry/user-note.php scripts/update-user-notes
| From: | Daniel Brown | Date: | Wed, 11 Jan 2012 01:07:06 +0000 |
| Subject: | Re: svn: /web/php-master/trunk/ entry/user-note.php scripts/update-user-notes | ||
| References: | 1 2 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-12775@lists.php.net to get a copy of this message | ||
Good catch, it most certainly is supposed to be !=.
On Jan 10, 2012 7:52 PM, "Peter Cowburn" <salathe@php.net> wrote:
> On 10 January 2012 19:41, Daniel P. Brown <danbrown@php.net> wrote:
> > danbrown Tue, 10 Jan 2012 19:41:33 +0000
> >
> > Revision:
> > http://svn.php.net/viewvc?view=revision&revision=322031
> >
> > Log:
> > Seeing Philip's discussion on IRC just now regarding ereg* functions
> reminded me to commit this. Been sitting on it for a year or more.
> >
> > Changed paths:
> > U web/php-master/trunk/entry/user-note.php
> > U web/php-master/trunk/scripts/update-user-notes
> >
> > Modified: web/php-master/trunk/entry/user-note.php
> > ===================================================================
> > --- web/php-master/trunk/entry/user-note.php 2012-01-10 18:35:14 UTC
> (rev 322030)
> > +++ web/php-master/trunk/entry/user-note.php 2012-01-10 19:41:33 UTC
> (rev 322031)
> > @@ -87,7 +87,7 @@
> > if ($count >= 3) {
> > //Send error to myself. If this happens too many times, I'll increase
> > //the amount of allowed notes
> > - mail ('alindeman@php.net,didou@php.net',
> > + mail ('alindeman@php.net,didou@php.net,danbrown@php.net',
> > '[php-notes] Quota exceeded',
> > 'Too many notes submitted in one minute. Consider increasing
> quota' . "\n" .
> > 'Occured at '.date ('M d, Y g:i:s A') . "\n" .
> > @@ -100,7 +100,7 @@
> > die ('[TOO MANY NOTES]');
> > }
> >
> > -$sect = trim(ereg_replace("\.php$","",$sect));
> > +$sect = trim(preg_replace('/\.php$/','',$sect));
> >
> > $query = "INSERT INTO note (user, note, sect, ts, status) VALUES ";
> > # no need to call htmlspecialchars() -- we handle it on output
> >
> > Modified: web/php-master/trunk/scripts/update-user-notes
> > ===================================================================
> > --- web/php-master/trunk/scripts/update-user-notes 2012-01-10 18:35:14
> UTC (rev 322030)
> > +++ web/php-master/trunk/scripts/update-user-notes 2012-01-10 19:41:33
> UTC (rev 322031)
> > @@ -15,7 +15,7 @@
> > $token = rawurlencode($token);
> >
> > $root = $argv[1];
> > -if (!ereg("/\$",$root)) {
> > +if (substr($root,-1)) {
>
> These two lines don't do the same thing. Did you miss out !=="/" or
> similar?
>
> > $root = "$root/";
> > }
> > $since = $argv[2];
> >
> >
> > --
> > PHP Webmaster List Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>