moved gzip compression to init.php
darcs-hash:20060519212751-7ad00-ace54b61706fdf4f1b7c2abdbabee215a1e256ab.gz
This commit is contained in:
parent
64c9cfd50f
commit
3138b5c760
|
@ -60,6 +60,14 @@
|
||||||
// make session rewrites XHTML compliant
|
// make session rewrites XHTML compliant
|
||||||
@ini_set('arg_separator.output', '&');
|
@ini_set('arg_separator.output', '&');
|
||||||
|
|
||||||
|
// enable gzip compression
|
||||||
|
if ($conf['gzip_output'] &&
|
||||||
|
!defined('DOKU_DISABLE_GZIP_OUTPUT') &&
|
||||||
|
function_exists('ob_gzhandler') &&
|
||||||
|
preg_match('/gzip|deflate/', $_SERVER['HTTP_ACCEPT_ENCODING'])) {
|
||||||
|
ob_start('ob_gzhandler');
|
||||||
|
}
|
||||||
|
|
||||||
// init session
|
// init session
|
||||||
if (!headers_sent() && !defined('NOSESSION')){
|
if (!headers_sent() && !defined('NOSESSION')){
|
||||||
session_name("DokuWiki");
|
session_name("DokuWiki");
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
function template($tpl){
|
function template($tpl){
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($conf['gzip_output'] && extension_loaded('zlib') && preg_match('/gzip|deflate/', $_SERVER['HTTP_ACCEPT_ENCODING'])) {
|
|
||||||
ob_start('ob_gzhandler');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
|
if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
|
||||||
return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
|
return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
|
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
|
||||||
|
define('DOKU_DISABLE_GZIP_OUTPUT', 1);
|
||||||
require_once(DOKU_INC.'inc/init.php');
|
require_once(DOKU_INC.'inc/init.php');
|
||||||
require_once(DOKU_INC.'inc/common.php');
|
require_once(DOKU_INC.'inc/common.php');
|
||||||
require_once(DOKU_INC.'inc/pageutils.php');
|
require_once(DOKU_INC.'inc/pageutils.php');
|
||||||
|
|
Loading…
Reference in New Issue