X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Finit.php;h=b5176403c9159a018d91d698be7e79d3bf8b4ac2;hp=80962c357347843ac65bc96082fbcdef2afcea50;hb=775a1f52b3e6224cba9fe8f32c9ff0527c6076e7;hpb=1f2f93e6751d2c1b957aa7d197269b5c49df5d72;ds=sidebyside diff --git a/include/init.php b/include/init.php index 80962c35..b5176403 100644 --- a/include/init.php +++ b/include/init.php @@ -19,7 +19,6 @@ FIXME: disabling this for now, because we now have $sm_debug_mode, but the probl //error_reporting(E_ALL); - /** * Make sure we have a page name * @@ -447,6 +446,19 @@ if (! sqgetGlobalVar('squirrelmail_language',$squirrelmail_language,SQ_COOKIE)) } +/** + * In some cases, buffering all output allows more complex functionality, + * especially for plugins that want to add headers on hooks that are beyond + * the point of output having been sent to the browser otherwise. + * + * Note that we don't turn this on any earlier since we want to allow plugins + * to turn it on themselves via a configuration override on the prefs_backend + * hook. + * + */ +if ($buffer_output) ob_start(!empty($buffered_output_handler) ? $buffered_output_handler : NULL); + + /** * Do something special for some pages. This is based on the PAGE_NAME constant * set at the top of every page.