[dev] Problem with compression and bufferOutput call?

Chris chris at jeks.net
Tue Jul 29 22:37:29 PDT 2003


Any issues you know about with 4.3.1 offhand? Will be upgrading to see
if this goes away anyhow, just curious if anyone knew.

On the 'hack' front, my apologies. Was a bit quick on the draw. I just
looked at the code and my first thought was ... why?

Out of the 21 or so times bufferOutput is used, 14 of them are just
require's and include's of files. I just found it odd that this simple
action (for which there is a PHP primitive now - file_get_contents())
was wrapped in something like this.

Every other function that uses bufferOutput is internal to Horde.

I can see where using bufferOutput would be useful, but using it in
preference to a built in PHP function that also causes the code to be
less readable? Seemed odd at the time, especially looking at an apparant
issue that seemed to be caused by it. 

Now I know noone else has this problem I'm back to building a new version of
PHP ...

 Chris

On Tue, Jul 29, 2003 at 08:28:57PM -0400, Chuck Hagenbuch wrote:
> Quoting Chris <chris at jeks.net>:
> 
> > Is anyone else having issues with having compression on and certain
> > screens that use bufferOutput?
> 
> Nope.
> 
> > I took a look at bufferOutput and it uses ob_start() / ob_end_clean()
> > combo to get output from a function that normally outputs to stdout.
> >
> > Does that strike anyone else as the ultimate hack?
> 
> No.
> 
> > Why not rewrite those functions you need to return output, and change the
> > usage of those to just 'print $output'?!
> 
> Because the functions we use this for either involve including templates, or
> calling PHP functions which print their output instead of returning it.
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck at horde.org>
> They're just looking at a wall of meat.
> 
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org

-- 
~ ~ ~
Chris Hyde

'Life is like a grapefruit.' - Ford Prefect

~ ~ ~


More information about the dev mailing list