diff --git a/code/CloudBucket.php b/code/CloudBucket.php index cca27e1..d3a3049 100644 --- a/code/CloudBucket.php +++ b/code/CloudBucket.php @@ -145,7 +145,7 @@ public function getLinkFor($f, $linkType = self::LINK_SMART) { break; default: - $ssl = Director::is_https() && !empty($this->secureURL); + $ssl = (Director::protocol() == 'https://') && !empty($this->secureURL); $field = $ssl ? 'secureURL' : 'baseURL'; } diff --git a/code/wrappers/CloudImage.php b/code/wrappers/CloudImage.php index b32b8df..8203eda 100644 --- a/code/wrappers/CloudImage.php +++ b/code/wrappers/CloudImage.php @@ -11,7 +11,7 @@ */ class CloudImage extends Image implements CloudAssetInterface { - private static $has_many = array( + public static $has_many = array( 'DerivedImages' => 'CloudImageCachedStore', ); @@ -90,7 +90,7 @@ function getDimensions($dim = "string") { * @param string $format The name of the format. * @return CloudImageCached|null */ - public function getFormattedImage($format) { + public function getFormattedImage($format, $arg1 = NULL, $arg2 = NULL) { $args = func_get_args(); $logger = CloudAssets::inst()->getLogger(); diff --git a/code/wrappers/CloudImageCachedStore.php b/code/wrappers/CloudImageCachedStore.php index 5c93455..01eb1e8 100644 --- a/code/wrappers/CloudImageCachedStore.php +++ b/code/wrappers/CloudImageCachedStore.php @@ -16,18 +16,18 @@ */ class CloudImageCachedStore extends DataObject { - private static $db = array( + public static $db = array( 'Filename' => 'Varchar(255)', 'CloudStatus' => "Enum('Local,Live,Error','Local')", 'CloudSize' => 'Int', 'CloudMetaJson' => 'Text', // saves any bucket or file-type specific information ); - private static $has_one = array( + public static $has_one = array( 'Source' => 'CloudImage', ); - private static $indexes = array( + public static $indexes = array( 'Filename' => true, ); diff --git a/composer.json b/composer.json index bb0320c..96ab86a 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } }, "require": { - "silverstripe/framework": ">=3.1" + "silverstripe/framework": "~3.0" }, "suggest": { "markguinn/silverstripe-cloudassets-rackspace": "Rackspace bucket driver",