Fixing misleading SimpleImageField deprecation message

This commit is contained in:
Sean Harvey 2012-10-11 16:58:57 +13:00
parent 27a7fc34c1
commit bc64de0264

View File

@ -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) {