On Mon, Sep 17, 2012 at 11:19:33AM -0400, [email protected] wrote:
> On Mon, Sep 17, 2012 at 8:11 AM,  <[email protected]> wrote:
> > From: "Mario (xenji) Mueller" <[email protected]>
> >
> > Signed-off-by: Mario (xenji) Mueller <[email protected]>
> > ---
> >  web/lib/acctfuncs.inc.php | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
> > index d58c759..6f7c98a 100644
> > --- a/web/lib/acctfuncs.inc.php
> > +++ b/web/lib/acctfuncs.inc.php
> > @@ -327,9 +327,8 @@ function 
> > search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
> >         }
> >
> >         $result = db_query($q, $dbh);
> > -       $num_rows = mysql_num_rows($result);
> 
> Is this really unused? I can't check right now, but I have a feeling
> this breaks account searching. The account search results page is
> finicky and needs a lot of work (pagination more like package results
> page, GET requests rather than POST, etc).

I hope it's unused -- you removed it in the PDO patch (which also
supersedes this one) :)

> 
> >
> > -       while ($row = mysql_fetch_assoc($result)) {
> > +       while (($row = mysql_fetch_assoc($result)) != false) {
> 
> I don't know Lukas' preference here. A style for this should probably
> be established and used.

The original version is obviously easier to read... I agree that we need
to improve our coding style guidelines and add some more
principles/examples.

> 
> >                 $userinfo[] = $row;
> >         }
> >
> > --
> > 1.7.12
> >

Reply via email to