API CHANGE Deprecated SimpleImageField, use FileField or UploadField with setAllowedExtensions()

This commit is contained in:
Ingo Schommer 2012-02-02 16:26:19 +01:00
parent c0d187071a
commit 9c0a606abf

View File

@ -63,9 +63,14 @@
* @subpackage fields-files * @subpackage fields-files
*/ */
/**
* @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
*/
class SimpleImageField extends FileField { class SimpleImageField extends FileField {
function __construct($name, $title = null, $value = null) { function __construct($name, $title = null, $value = null) {
Deprecation::notice('3.0', "Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')");
if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRightTitle() and setFolderName() instead of constructor arguments'); if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRightTitle() and setFolderName() instead of constructor arguments');
parent::__construct($name, $title, $value); parent::__construct($name, $title, $value);