From: Steve W. <sw...@pa...> - 2001-09-21 20:21:59
|
Gary, could you post these to https://sourceforge.net/tracker/?group_id=6121&atid=306121 That way they are more accessible... patches sometimes get truncated in the mail archive. thx! ~swain On Fri, 21 Sep 2001, Gary Benson wrote: > > On Fri, 21 Sep 2001, Gary Benson wrote: > > > > > Any of you guys who are running a PhpWiki-1.2.0 site may benefit from this > > > > patch, which should lower the load on your server. It removes an > > > > "efficiency" thing which meant that the MostPopular list was generated on > > > > every pageview. > > > > > > Hi Gary, > > > > > > Good catch! > > > > > > But... I think your patch makes the situation worse. > > > > > > > + $tmpline = str_replace('%%Search%%', RenderQuickSearch(), $tmpline); > > > > + $tmpline = str_replace('%%Fullsearch%%', RenderFullSearch(), $tmpline); > > > > + $tmpline = str_replace('%%Mostpopular%%', RenderMostPopular(), $tmpline); > > > > > > I think this calls RenderMostPopular() once for every line in the > > > page... > > > I think the correct fix is something like: > > > > > > if (strstr($tmpline, '%%Mostpopular%%')) > > > $tmpline = str_replace('%%Mostpopular%%', RenderMostPopular(), > > > $tmpline); > > > > > > (Not that I've tested any of this or anything...) > > > > Doh! > > > > Expect a revised patch soonish... > > Try these two instead... > --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa http://pgp.document_type.org:11371/pks/lookup?op=get&search=0xF7323BAC |