More Quercus fixes

This commit is contained in:
Timothy Warren 2012-01-11 12:21:52 -05:00
parent aedc4bb31a
commit eebe7c8fc8
4 changed files with 45 additions and 14 deletions

View File

@ -1,4 +1,16 @@
<?php <?php
/**
* MiniMVC
*
* Convention-based micro-framework for PHP
*
* @author Timothy J. Warren
* @copyright Copyright (c) 2011 - 2012
* @link https://github.com/timw4mail/miniMVC
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
class Welcome extends MM_Controller { class Welcome extends MM_Controller {

View File

@ -1,6 +1,24 @@
<?php <?php
/**
* MiniMVC
*
* Convention-based micro-framework for PHP
*
* @author Timothy J. Warren
* @copyright Copyright (c) 2011 - 2012
* @link https://github.com/timw4mail/miniMVC
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
/**
* Model template class
*/
class Welcome_Model extends MM_Model{ class Welcome_Model extends MM_Model{
function __construct(){} function __construct()
{
parent::__construct();
}
} }

View File

@ -23,9 +23,6 @@ class Output extends JSObject{
function __construct() function __construct()
{ {
// Compression is good!
//ob_start("ob_gzhandler");
$this->buffer = ""; $this->buffer = "";
$this->headers = array(); $this->headers = array();
} }
@ -41,22 +38,26 @@ class Output extends JSObject{
// Set headers // Set headers
foreach($this->headers as $key => $val) foreach($this->headers as $key => $val)
{ {
if( ! isset($val)) if( ! empty( $key or $val))
{ {
@header($key); if( ! isset($val))
{
@header($key);
}
else
{
@header("$key: $val");
}
} }
else
{
@header("$key: $val");
}
} }
} }
if( ! empty($this->buffer)) if( ! empty($this->buffer))
{ {
// Compression is good!
ob_start("ob_gzhandler");
echo $this->buffer; echo $this->buffer;
//ob_end_flush(); ob_end_flush();
} }
} }