Registry rewritten, exception added #2
[core.git] / inc / classes / main / response / image / class_ImageResponse.php
index ac46e101187cd817d247cbe2d6ba65cdc41541e0..649bddd82a70d6d663806866c44cb8667db233e6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
  * Michal Cihar <michal@cihar.com>, licensed under GNU GPL 2.0.
  */
 class ImageResponse extends BaseResponse implements Responseable {
-       /**
-        * Instance of the image
-        */
-       private $imageInstance = null;
-
        /**
         * Protected constructor
         *
@@ -71,7 +66,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                $cfg = $this->getConfigInstance();
 
                // Set new template engine
-               $cfg->setConfigEntry('template_class'         , $cfg->getConfigEntry('image_template_class'));
+               $cfg->setConfigEntry('web_template_class'         , $cfg->getConfigEntry('image_template_class'));
                $cfg->setConfigEntry('raw_template_extension' , '.img');
                $cfg->setConfigEntry('code_template_extension', '.xml');
                $cfg->setConfigEntry('tpl_base_path'          , 'templates/images/');
@@ -104,6 +99,8 @@ class ImageResponse extends BaseResponse implements Responseable {
 
                // Shall we encrypt the cookie?
                if ($encrypted === true) {
+                       // Unsupported at the moment
+                       $this->partialStub('Encryption is unsupported at the moment.');
                } // END - if
 
                // For slow browsers set the cookie array element first
@@ -164,7 +161,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                } // END - if
 
                // Add redirect header
-               $this->addHeader('Location', $url);
+               $this->addHeader('Location', str_replace('&amp;', '&', $url));
 
                // Set correct response status
                $this->setResponseStatus('301 Moved Permanently');
@@ -234,25 +231,6 @@ class ImageResponse extends BaseResponse implements Responseable {
                } // END - if
        }
 
-       /**
-        * Setter for image instanxe
-        *
-        * @param       $imageInstance  An instance of an image
-        * @return      void
-        */
-       public final function setImageInstance (BaseImage $imageInstance) {
-               $this->imageInstance = $imageInstance;
-       }
-
-       /**
-        * Getter for image instanxe
-        *
-        * @return      $imageInstance  An instance of an image
-        */
-       public final function getImageInstance () {
-               return $this->imageInstance;
-       }
-
        /**
         * Getter for default command
         *