mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-27 15:09:30 +02:00
Use Injector to create default Upload_Validator instance
Allows this class to be swapped out with a custom Upload_Validator globally, without having to call Upload::setValidator() everywhere.
This commit is contained in:
parent
f7a9005a8e
commit
5491a5dadc
|
@ -74,7 +74,7 @@ class Upload extends Controller {
|
|||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->validator = new Upload_Validator();
|
||||
$this->validator = Injector::inst()->create('Upload_Validator');
|
||||
$this->replaceFile = self::config()->replaceFile;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user