[mythtv] [PATCH] mythweb exact match

Aj aj at paragontech.com
Wed Feb 11 15:36:36 EST 2004


> I confess that I don't understand why these are both necessary; shouldn't
> all of these lines in the second bit here be replaced by adding the
> corresponding variables to the foreach above?  It seems to do exactly the
> same thing.

I agree that there is probably a better way to do this.  I just didn't want to go lobotomizing a 
bunch of code on my first patch :).

> > +print_r($query);
> 
> This should be removed, yes?

Uhg, I've got so much debug code on that page, I missed that one :/. Thanks for pointing it out.

> Will this still do the right thing by escaping '%' in non-LIKE comparisons?

Do you mean, will it search for a program title like "Title with a % in it" and find it correctly? It 
does that, but maybe I'm missing your point?

> I got the impression that a large chunk of this file should be rewritten, as
> things have been tacked on over time.  There should be one big, clear
> if/else or case statement (does php have case statements?) which handles
> each type of search.  They don't really share much code at all and there are
> some weird fall-through conditions and the indentation is messed up.

Yeah, php does have case statements.  Like I said, I didn't want to go chopping up someones 
code, stepping on toes or what not.  I made my mythbox last week, I just wanted to contribute 
somehow. But I'd be glad to revamp the code a bit.  In which case, my first patch can probably 
be discarded for a more complete one a little later on.

Aj




More information about the mythtv-dev mailing list