Skip to content

Commit

Permalink
Merge branch 'integration' of github.com:symphonists/order_entries
Browse files Browse the repository at this point in the history
  • Loading branch information
nitriques committed Nov 20, 2015
2 parents ff955e2 + 3fe40d7 commit f8e126d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function update($previousVersion) {

$fields = Symphony::Database()->fetchCol('field_id',"SELECT field_id FROM `tbl_fields_order_entries`");

foreach ($fields as $key => $field) {
foreach ($fields as $key => $field) {
$status[] = Symphony::Database()->query("
ALTER TABLE `tbl_entries_data_{$field}`
DROP INDEX `entry_id`
Expand Down
3 changes: 3 additions & 0 deletions extension.meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
</author>
</authors>
<releases>
<release version="2.3.2" date="2015-11-20" min="2.5" max="2.6.x">
- Fix bug where value was also being set for null filters
</release>
<release version="2.3.1" date="2015-10-07" min="2.5" max="2.6.x">
- Bug fixes (#69, #72, #73)
</release>
Expand Down
6 changes: 3 additions & 3 deletions fields/field.order_entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private function updateFilterTable(){

// fetch existing table schema
$currentFilters = Symphony::Database()->fetchCol('Field',"SHOW COLUMNS FROM tbl_entries_data_{$orderFieldId} WHERE Field like 'field_%';");

//change the value format to match the filtered fields stored
foreach ($currentFilters as $key => $value) {
$currentFilter = substr($value, 6);
Expand Down Expand Up @@ -299,7 +299,7 @@ function displayPublishPanel(&$wrapper, $data = null, $flagWithError = null, $fi
foreach ($row as $key => $value) {
$input = Widget::Input(
'fields' . $fieldnamePrefix . '[' . $this->get('element_name') . '][' . $col . '][' . $key . ']' . $fieldnamePostfix,
(strlen($value) !== 0 ? (string)$value : (string)++$max_position["max"]),
(strlen($value) !== 0 || $col != 'value') ? (string)$value : (string)++$max_position["max"],
($this->get('hide') == 'yes' || $col != 'value') ? 'hidden' : 'text'
);
$inputs->appendChild($input);
Expand Down Expand Up @@ -354,7 +354,7 @@ public function checkPostFieldData($data, &$message, $entry_id = null) {
$numeric = array_filter($data['value'],'is_numeric');
if (sizeof($numeric) != sizeof($data['value'])){
$message = __('Must be a number.');
return self::__INVALID_FIELDS__;
return self::__INVALID_FIELDS__;
}
} else if(strlen($data) > 0 && !is_numeric($data)) {
$message = __('Must be a number.');
Expand Down

0 comments on commit f8e126d

Please sign in to comment.