Skip to content

Commit d6dc931

Browse files
committed
Change the behavior of the getFilterOptions
- `usedOnly` is now the default behavior if there is no id list given.
1 parent e2d2aa2 commit d6dc931

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/MetaModels/Attribute/BaseSimple.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,13 @@ public function getFilterOptions($idList, $usedOnly, &$arrCount = null)
102102
ORDER BY FIELD(id,' . $this->parameterMask($idList). ')'
103103
)
104104
->execute(array_merge($idList, $idList));
105-
} elseif ($usedOnly) {
105+
} else {
106106
$objRow = $this->getMetaModel()->getServiceContainer()->getDatabase()->execute(
107107
'SELECT ' . $strCol . ', COUNT(' . $strCol . ') as mm_count
108108
FROM ' . $this->getMetaModel()->getTableName() . '
109109
GROUP BY ' . $strCol . '
110110
ORDER BY ' . $strCol
111111
);
112-
} else {
113-
// We can not do anything here, must be handled by the derived attribute class.
114-
return array();
115112
}
116113

117114
$arrResult = array();

0 commit comments

Comments
 (0)