Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

API CHANGE Removed $rightTitle and $folderName constructor arguments …

…for FileField and SimpleImageField, use setRightTitle() and setFolderName() instead
  • Loading branch information...
commit 27ec98cfce46021dc5509059f6809446d51b88c0 1 parent 1a10e8b
@chillu chillu authored
Showing with 8 additions and 8 deletions.
  1. +4 −6 forms/FileField.php
  2. +4 −2 forms/SimpleImageField.php
View
10 forms/FileField.php
@@ -101,15 +101,13 @@ class FileField extends FormField {
* @param string $name The internal field name, passed to forms.
* @param string $title The field label.
* @param int $value The value of the field.
- * @param Form $form Reference to the container form
- * @param string $rightTitle Used in SmallFieldHolder() to force a right-aligned label
- * @param string $folderName Folder to upload files to
*/
- function __construct($name, $title = null, $value = null, $form = null, $rightTitle = null, $folderName = null) {
- if(isset($folderName)) $this->folderName = $folderName;
+ function __construct($name, $title = null, $value = null) {
+ if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRightTitle() and setFolderName() instead of constructor arguments');
+
$this->upload = new Upload();
- parent::__construct($name, $title, $value, $form, $rightTitle);
+ parent::__construct($name, $title, $value);
}
public function Field($properties = array()) {
View
6 forms/SimpleImageField.php
@@ -65,8 +65,10 @@
class SimpleImageField extends FileField {
- function __construct($name, $title = null, $value = null, $form = null, $rightTitle = null, $folderName = null) {
- parent::__construct($name, $title, $value, $form, $rightTitle, $folderName);
+ function __construct($name, $title = null, $value = null) {
+ if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRightTitle() and setFolderName() instead of constructor arguments');
+
+ parent::__construct($name, $title, $value);
$this->getValidator()->setAllowedExtensions(array('jpg','gif','png'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.