mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Allow configuring Image backend via yaml.
This commit is contained in:
parent
48dd233050
commit
ac95a875ed
@ -73,11 +73,11 @@ class Image extends File {
|
||||
private static $force_resample = false;
|
||||
|
||||
public static function set_backend($backend) {
|
||||
self::$backend = $backend;
|
||||
self::config()->backend = $backend;
|
||||
}
|
||||
|
||||
public static function get_backend() {
|
||||
return self::$backend;
|
||||
return self::config()->backend;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -464,7 +464,7 @@ class Image extends File {
|
||||
|
||||
$cacheFile = call_user_func_array(array($this, "cacheFilename"), $args);
|
||||
|
||||
$backend = Injector::inst()->createWithArgs(self::$backend, array(
|
||||
$backend = Injector::inst()->createWithArgs(self::config()->backend, array(
|
||||
Director::baseFolder()."/" . $this->Filename
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user