Make sure to pass parameters to parent const'r
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 31 Jul 2009 17:19:54 +0000 (13:19 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 31 Jul 2009 17:19:54 +0000 (13:19 -0400)
yipee...I can see pictures again :)

ansel/lib/View/Base.php
ansel/lib/View/Image.php

index 92d0c55..0353c14 100644 (file)
@@ -32,7 +32,7 @@ abstract class Ansel_View_Base
     protected $_widgets = array();
 
 
-    public function __construct($params)
+    public function __construct($params = array())
     {
         $this->_params = $params;
     }
index 1ae9e4e..87cb6eb 100644 (file)
@@ -25,7 +25,7 @@ class Ansel_View_Image extends Ansel_View_Base
      */
     public function __construct($params = array())
     {
-        parent::__construct();
+        parent::__construct($params);
 
         /* Get the image */
         $image_id = $params['image_id'];
@@ -34,7 +34,7 @@ class Ansel_View_Image extends Ansel_View_Base
         $image = &$GLOBALS['ansel_storage']->getImage($image_id);
 
         /* Get the Ansel_Gallery */
-        $this->gallery = $view->getGallery();
+        $this->gallery = $this->getGallery();
 
         /* Save the image reference */
         $this->resource = $image;