mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixing misleading SimpleImageField deprecation message
This commit is contained in:
parent
27a7fc34c1
commit
bc64de0264
@ -64,14 +64,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
|
||||
* @deprecated 3.0 Use UploadField with $myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'));
|
||||
*/
|
||||
class SimpleImageField extends FileField {
|
||||
|
||||
public function __construct($name, $title = null, $value = null) {
|
||||
Deprecation::notice('3.0',
|
||||
"SimpleImageField is deprecated. Use UploadField with "
|
||||
. "\$myField->allowedExtensions = array('jpg', 'gif', 'png')",
|
||||
. "\$myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'))",
|
||||
Deprecation::SCOPE_CLASS);
|
||||
|
||||
if(count(func_get_args()) > 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user