Skip to content

Commit

Permalink
API CHANGE Deprecated FileIframeField and ImageField, use UploadField…
Browse files Browse the repository at this point in the history
… instead
  • Loading branch information
chillu committed Feb 2, 2012
1 parent 041da99 commit b8cc208
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions forms/FileIFrameField.php
Expand Up @@ -5,6 +5,8 @@
*
* If all you need is a simple file upload, it is reccomended you use {@link FileField}
*
* @deprecated 3.0 Use UploadField
*
* @package forms
* @subpackage fields-files
*/
Expand Down Expand Up @@ -59,6 +61,8 @@ public function dataClass() {
* @return string
*/
public function Field() {
Deprecation::notice('3.0', 'Use UploadField');

Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Expand Down
4 changes: 4 additions & 0 deletions forms/ImageField.php
Expand Up @@ -18,6 +18,8 @@
* $myField->setFolderName('myFolder');
* </code>
*
* @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
*
* @package forms
* @subpackage fields-files
*/
Expand All @@ -43,6 +45,8 @@ public function FileTypeName() {
* @return Form
*/
public function EditFileForm() {
Deprecation::notice('3.0', 'Use UploadField');

$filter = create_function('$item', 'return (in_array("Folder", ClassInfo::ancestry($item->ClassName)) || in_array("Image", ClassInfo::ancestry($item->ClassName)));');

$form = parent::EditFileForm();
Expand Down

0 comments on commit b8cc208

Please sign in to comment.