Resolved gh-576 to allow empty filter options.

This commit is contained in:
Llewellyn van der Merwe 2020-07-26 18:21:08 +02:00
parent 6bb23fc6ee
commit 05da68f1ae
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
6 changed files with 39 additions and 17 deletions

View File

@ -144,12 +144,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th July, 2020 + *Last Build*: 26th July, 2020
+ *Version*: 2.11.2 + *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **283043** + *Line count*: **283055**
+ *Field count*: **1525** + *Field count*: **1526**
+ *File count*: **1785** + *File count*: **1785**
+ *Folder count*: **295** + *Folder count*: **295**

View File

@ -144,12 +144,12 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th July, 2020 + *Last Build*: 26th July, 2020
+ *Version*: 2.11.2 + *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **283043** + *Line count*: **283055**
+ *Field count*: **1525** + *Field count*: **1526**
+ *File count*: **1785** + *File count*: **1785**
+ *Folder count*: **295** + *Folder count*: **295**

View File

@ -3160,12 +3160,17 @@ class Interpretation extends Fields
. $ter['table_key'] . " " . $ter['operator'] . $ter['table_key'] . " " . $ter['operator']
. " (' . implode(',', \$array) . ')');"; . " (' . implode(',', \$array) . ')');";
$string .= PHP_EOL . $this->_t(2) . $tab . "}"; $string .= PHP_EOL . $this->_t(2) . $tab . "}";
$string .= PHP_EOL . $this->_t(2) . $tab . "else"; // check if empty is allowed
if (!isset($ter['empty']) || !$ter['empty'])
{
$string .= PHP_EOL . $this->_t(2) . $tab
. "else";
$string .= PHP_EOL . $this->_t(2) . $tab . "{"; $string .= PHP_EOL . $this->_t(2) . $tab . "{";
$string .= PHP_EOL . $this->_t(2) . $tab $string .= PHP_EOL . $this->_t(2) . $tab
. $this->_t(1) . "return false;"; . $this->_t(1) . "return false;";
$string .= PHP_EOL . $this->_t(2) . $tab . "}"; $string .= PHP_EOL . $this->_t(2) . $tab . "}";
} }
}
else else
{ {
$string = PHP_EOL . $this->_t(2) . $tab . "//" $string = PHP_EOL . $this->_t(2) . $tab . "//"
@ -3193,12 +3198,17 @@ class Interpretation extends Fields
. $ter['table_key'] . " " . $ter['operator'] . $ter['table_key'] . " " . $ter['operator']
. " ' . \$checkValue);"; . " ' . \$checkValue);";
$string .= PHP_EOL . $this->_t(2) . $tab . "}"; $string .= PHP_EOL . $this->_t(2) . $tab . "}";
$string .= PHP_EOL . $this->_t(2) . $tab . "else"; // check if empty is allowed
if (!isset($ter['empty']) || !$ter['empty'])
{
$string .= PHP_EOL . $this->_t(2) . $tab
. "else";
$string .= PHP_EOL . $this->_t(2) . $tab . "{"; $string .= PHP_EOL . $this->_t(2) . $tab . "{";
$string .= PHP_EOL . $this->_t(2) . $tab $string .= PHP_EOL . $this->_t(2) . $tab
. $this->_t(1) . "return false;"; . $this->_t(1) . "return false;";
$string .= PHP_EOL . $this->_t(2) . $tab . "}"; $string .= PHP_EOL . $this->_t(2) . $tab . "}";
} }
}
break; break;
case 9: case 9:
// COM_COMPONENTBUILDER_DYNAMIC_GET_ARRAY_VALUE // COM_COMPONENTBUILDER_DYNAMIC_GET_ARRAY_VALUE

View File

@ -4512,6 +4512,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_DIRECTION_LABEL="Ordering Direction"
COM_COMPONENTBUILDER_DYNAMIC_GET_E="e" COM_COMPONENTBUILDER_DYNAMIC_GET_E="e"
COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT="Editing the Dynamic Get" COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT="Editing the Dynamic Get"
COM_COMPONENTBUILDER_DYNAMIC_GET_EE="ee" COM_COMPONENTBUILDER_DYNAMIC_GET_EE="ee"
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION="Empty"
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL="Allow"
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL="equal" COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL="equal"
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT="equal or not" COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT="equal or not"
COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS="Another Dynamic Get has the same alias." COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS="Another Dynamic Get has the same alias."

View File

@ -810,6 +810,16 @@
message="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_MESSAGE" message="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_MESSAGE"
hint="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_HINT" hint="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_HINT"
/> />
<!-- Empty Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="empty"
label="COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL"
value="1"
default="0"
description="COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION"
class="inputbox"
/>
</form> </form>
</field> </field>
<!-- Add_php_after_getitems Field. Type: Radio. (joomla) --> <!-- Add_php_after_getitems Field. Type: Radio. (joomla) -->

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>24th July, 2020</creationDate> <creationDate>26th July, 2020</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>