diff --git a/lib/browse/Criteria.inc b/lib/browse/Criteria.inc
index 4e9d354..ec42e00 100644
--- a/lib/browse/Criteria.inc
+++ b/lib/browse/Criteria.inc
@@ -152,7 +152,11 @@ class BrowseCriterion {
}
function searchWidget ($aRequest) {
- return "getID() . "\" />";
+ return "getWidgetBase() . "\" />";
+ }
+
+ function getWidgetBase () {
+ return "bmd" . strtr($this->getID(), '-', '_');
}
function getSearchTable() {
@@ -161,9 +165,9 @@ class BrowseCriterion {
function searchSQL ($aRequest) {
if ($this->bString) {
- return array($this->getSearchTable() . "." . $this->getSearchField() . " LIKE '%" . DBUtil::escapeSimple($aRequest['bmd' . $this->getID()]) . "%'", array());
+ return array($this->getSearchTable() . "." . $this->getSearchField() . " LIKE '%" . DBUtil::escapeSimple($aRequest[$this->getWidgetBase()]) . "%'", array());
} else {
- return array($this->getSearchTable() . "." . $this->getSearchField() . " = ?", array($aRequest['bmd' . $this->getID()]));
+ return array($this->getSearchTable() . "." . $this->getSearchField() . " = ?", array($aRequest[$this->getWidgetBase()]));
}
}
}
@@ -242,7 +246,7 @@ class CreatorCriterion extends BrowseCriterion {
return $this->documentDisplay($oFolder);
}
function searchWidget ($aRequest) {
- $sRet = "