From 507f9909bd78e74f9169efcc741b774f55ef4d5a Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 11 Oct 2010 21:21:34 +0000 Subject: [PATCH] MINOR Moved GD::set_default_quality() function to the top of the file to align with conventions git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111888 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/GD.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/filesystem/GD.php b/filesystem/GD.php index 841fd93d1..36a0b4acb 100755 --- a/filesystem/GD.php +++ b/filesystem/GD.php @@ -9,7 +9,17 @@ class GD extends Object { protected $quality; protected static $default_quality = 75; - + + /** + * Set the default image quality. + * @param quality int A number from 0 to 100, 100 being the best quality. + */ + static function set_default_quality($quality) { + if(is_numeric($quality) && (int) $quality >= 0 && (int) $quality <= 100) { + self::$default_quality = (int) $quality; + } + } + function __construct($filename = null) { // If we're working with image resampling, things could take a while. Bump up the time-limit increase_time_limit_to(300); @@ -38,16 +48,6 @@ class GD extends Object { return $this->gd; } - /** - * Set the default image quality. - * @param quality int A number from 0 to 100, 100 being the best quality. - */ - static function set_default_quality($quality) { - if(is_numeric($quality) && (int) $quality >= 0 && (int) $quality <= 100) { - self::$default_quality = (int) $quality; - } - } - /** * Set the image quality, used when saving JPEGs. */