summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f30bbc2)
raw | patch | inline | side by side (parent: f30bbc2)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 24 Sep 2007 15:57:59 +0000 (15:57 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 24 Sep 2007 15:57:59 +0000 (15:57 +0000) |
* Added option to enabled compressed output
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7393 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7393 594d385d-05f5-0310-b6e9-bd551577e9d8
html/index.php | patch | blob | history | |
html/main.php | patch | blob | history | |
include/functions.inc | patch | blob | history |
diff --git a/html/index.php b/html/index.php
index 2f7a401ae34ee8c69b541c26fb3b8fb154f74402..6886f908b3ee7f542aca3056db347420e9ebda83 100644 (file)
--- a/html/index.php
+++ b/html/index.php
@DEBUG (DEBUG_CONFIG, __LINE__, __FUNCTION__, __FILE__, $config->data, "config");
}
+/* Enable compressed output */
+if (isset($config->data['MAIN']['COMPRESSED']) && preg_match('/^(true|on)$/i', $config->data['MAIN']['COMPRESSED'])){
+ ob_start("ob_gzhandler");
+}
+
/* Set template compile directory */
if (isset ($config->data['MAIN']['COMPILE'])){
$smarty->compile_dir= $config->data['MAIN']['COMPILE'];
diff --git a/html/main.php b/html/main.php
index 3620bce819b2a9a5fcbd3bd2209d74aeeb167199..745a2d2d79994fe5407b9a2da70852befaad9113 100644 (file)
--- a/html/main.php
+++ b/html/main.php
}
$config= $_SESSION['config'];
+/* Enable compressed output */
+if (isset($config->data['MAIN']['COMPRESSED']) && preg_match('/^(true|on)$/i', $config->data['MAIN']['COMPRESSED'])){
+ ob_start("ob_gzhandler");
+}
+
/* Check for invalid sessions */
if(empty($_SESSION['_LAST_PAGE_REQUEST'])){
$_SESSION['_LAST_PAGE_REQUEST']= time();
diff --git a/include/functions.inc b/include/functions.inc
index 8e2de5bdd1d8336863fe4455644a4191f0459c9a..6eb6c4ef9ef29e6a13742abe0ddf5a27b2f37a18 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
/* Try to use users primary language */
global $config;
$ui= get_userinfo();
- if ($ui !== NULL){
+ if (isset($ui) && $ui !== NULL){
if ($ui->language != ""){
return ($ui->language.".UTF-8");
}