Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function update($previousVersion = false)
}

// updating from versions prior to 1.2
if (version_compare($previous_version, '1.2', '<')) {
if (version_compare($previousVersion, '1.2', '<')) {

// Remove directory from the upload fields, fixes Symphony Issue #1719
$upload_tables = Symphony::Database()->fetchCol("field_id", "SELECT `field_id` FROM `tbl_fields_reflectedupload`");
Expand Down
3 changes: 3 additions & 0 deletions extension.meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
</author>
</authors>
<releases>
<release version="1.3.3" date="2023-05-09" min="2.4.x" max="2.7.x">
* PHP 8.2 compatibility
</release>
<release version="1.3.2" date="2021-07-14" min="2.4.x" max="2.7.x">
* Fixed broken error messages ([#13](https://github.com/twiro/reflecteduploadfield/issues/13))
* Removed obsolete function 'getUniqueFilename'
Expand Down
8 changes: 6 additions & 2 deletions fields/field.reflectedupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function displaySettingsPanel(XMLElement &$wrapper , $errors = null)
$label->appendChild($help);

if (isset($errors['expression'])) {
$wrapper->appendChild(Widget::wrapFormElementWithError($label , $errors['expression']));
$wrapper->appendChild(Widget::Error($label , $errors['expression']));
} else {
$wrapper->appendChild($label);
}
Expand Down Expand Up @@ -107,7 +107,11 @@ public function commit()
$fields = array();
$fields['field_id'] = $id;
$fields['destination'] = $this->get('destination');
$fields['validator'] = ($fields['validator'] == 'custom' ? NULL : $this->get('validator'));
if (in_array('validator', $fields)) {
$fields['validator'] = ($fields['validator'] == 'custom' ? NULL : $this->get('validator'));
} else {
$fields['validator'] = $this->get('validator');
}
$fields['expression'] = $this->get('expression');
$fields['unique'] = $this->get('unique');
$fields['unique'] = ($this->get('unique') ? 1 : 0);
Expand Down