Permalink
Browse files

API CHANGE Deprecated SimpleImageField, use FileField or UploadField …

…with setAllowedExtensions()
  • Loading branch information...
1 parent c0d1870 commit 9c0a606abf6d00d887a75b4b38f49db2aa8210ae @chillu chillu committed Feb 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 forms/SimpleImageField.php
View
5 forms/SimpleImageField.php
@@ -63,9 +63,14 @@
* @subpackage fields-files
*/
+/**
+ * @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
+ */
class SimpleImageField extends FileField {
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');
parent::__construct($name, $title, $value);

0 comments on commit 9c0a606

Please sign in to comment.