From eebe7c8fc8f254ff5988968dff88d5dbec920528 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 11 Jan 2012 12:21:52 -0500 Subject: [PATCH] More Quercus fixes --- modules/welcome/controllers/welcome.php | 12 ++++++++++++ modules/welcome/models/welcome_model.php | 20 ++++++++++++++++++- sys/output.php | 25 ++++++++++++------------ sys/r.php | 2 +- 4 files changed, 45 insertions(+), 14 deletions(-) diff --git a/modules/welcome/controllers/welcome.php b/modules/welcome/controllers/welcome.php index 993161f..fa9394b 100644 --- a/modules/welcome/controllers/welcome.php +++ b/modules/welcome/controllers/welcome.php @@ -1,4 +1,16 @@ buffer = ""; $this->headers = array(); } @@ -41,22 +38,26 @@ class Output extends JSObject{ // Set headers foreach($this->headers as $key => $val) { - if( ! isset($val)) + if( ! empty( $key or $val)) { - @header($key); - } - else - { - @header("$key: $val"); - } - + if( ! isset($val)) + { + @header($key); + } + else + { + @header("$key: $val"); + } + } } } if( ! empty($this->buffer)) { + // Compression is good! + ob_start("ob_gzhandler"); echo $this->buffer; - //ob_end_flush(); + ob_end_flush(); } } diff --git a/sys/r.php b/sys/r.php index 7937b7e..bff685f 100644 --- a/sys/r.php +++ b/sys/r.php @@ -57,7 +57,7 @@ class R extends ReflectionClass { $this->parent_class = $this->getParentClass(); $this->static_properties = $this->getStaticProperties(); $this->internal = (int)$this->isInternal(); - + return $this; }