Correcting constructor of MediaView to fix issues with viewVars not being set.

Correcting use of MediaView in Dispatcher.  Fixes #366
This commit is contained in:
mark_story 2009-12-01 09:50:27 -05:00
parent 0293a840c5
commit 547ed839d9
2 changed files with 7 additions and 3 deletions

View file

@ -605,7 +605,8 @@ class Dispatcher extends Object {
$this->_stop();
}
App::import('View', 'Media', false);
$Media = new MediaView();
$controller = null;
$Media = new MediaView($controller);
$ext = array_pop(explode('.', $url));
if (isset($Media->mimeType[$ext])) {

View file

@ -17,7 +17,9 @@
* @since CakePHP(tm) v 1.2.0.5714
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
class MediaView {
App::import('View', 'View', false);
class MediaView extends View {
/**
* Holds known mime type mappings
@ -90,7 +92,8 @@ class MediaView {
*
* @param object $controller
*/
function __construct($controller = null) {
function __construct(&$controller = null) {
parent::__construct($controller);
}
/**