diff --git a/code/config/GalleryConfig.php b/code/config/GalleryConfig.php index de30104..d64a33a 100755 --- a/code/config/GalleryConfig.php +++ b/code/config/GalleryConfig.php @@ -60,8 +60,8 @@ class GalleryConfig extends Object { * @param $height height of the images */ public static function setDimensions($width, $height) { - self::$width = $width; - self::$height = $height; + self::config()->width = $width; + self::config()->height = $height; } /** @@ -71,8 +71,8 @@ public static function setDimensions($width, $height) { * @param $height height of the images */ public static function setThumbDimensions($width, $height) { - self::$thumb_width = $width; - self::$thumb_height = $height; + self::config()->thumb_width = $width; + self::config()->thumb_height = $height; } /** @@ -81,26 +81,26 @@ public static function setThumbDimensions($width, $height) { * @param $width width of the images */ public static function setResizeType($type) { - self::$resize_type = $type; + self::config()->resize_type = $type; } public static function getWidth() { - return self::$width; + return self::config()->width; } public static function getHeight() { - return self::$height; + return self::config()->height; } public static function getThumbWidth() { - return self::$thumb_width; + return self::config()->thumb_width; } public static function getThumbHeight() { - return self::$thumb_height; + return self::config()->thumb_height; } public static function getResizeType() { - return self::$resize_type; + return self::config()->resize_type; } } diff --git a/code/extensions/GalleryImage.php b/code/extensions/GalleryImage.php index 4b26dda..fe18372 100644 --- a/code/extensions/GalleryImage.php +++ b/code/extensions/GalleryImage.php @@ -11,8 +11,8 @@ public function __construct() { public function GalleryImage() { $resize_type = GalleryConfig::getResizeType(); - $width = GalleryConfig::getWidth(); - $height = GalleryConfig::getHeight(); + $width = GalleryConfig::config()->width; + $height = GalleryConfig::config()->height; $img = false; switch ($resize_type) { @@ -31,8 +31,8 @@ public function GalleryImage() { } public function GalleryThumbnail() { - $width = GalleryConfig::getThumbWidth(); - $height = GalleryConfig::getThumbHeight(); + $width = GalleryConfig::config()->thumb_width; + $height = GalleryConfig::config()->thumb_height; return $this->owner->croppedImage($width,$height);