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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.settings/
/.buildpath
/.project
/Vendor/
2 changes: 1 addition & 1 deletion Controller/Component/FilterComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function beforeRender(Controller $controller)
break;

default:
continue;
continue 2;
}

// if no value has been set, show the default one
Expand Down
4 changes: 2 additions & 2 deletions Model/Behavior/FilteredBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ protected function buildFilterConditions(array &$query, $field, $options, $value
case 'text':
if (strlen(trim(strval($value))) == 0)
{
continue;
break;
}

$condition = $options['condition'];
Expand Down Expand Up @@ -385,7 +385,7 @@ protected function buildFilterConditions(array &$query, $field, $options, $value
case 'select':
if (is_string($value) && strlen(trim(strval($value))) == 0)
{
continue;
break;
}

$query['conditions'][$field] = $value;
Expand Down
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "kba-team/cakephp-filter-plugin",
"description": "Filter is a CakePHP plugin which enables you to create filtering forms for your data in a very fast and simple way, without getting in the way of paging, sorting and other \"standard\" things when displaying data. It also remembers the filter conditions in a session, but this can be turned off if undesirable.",
"type": "cakephp-plugin",
"license": "GPL-3.0-or-later",
"minimum-stability": "stable",
"require": {
"php": "^7.2",
"cakephp/cakephp": "^2.4",
"composer/installers": "^1.9"
},
"extra": {
"installer-name": "Filter"
},
"config": {
"vendor-dir": "Vendor/"
}
}
223 changes: 223 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.