[Mapbender-commits] r6777 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Aug 20 08:31:03 EDT 2010
Author: christoph
Date: 2010-08-20 12:31:03 +0000 (Fri, 20 Aug 2010)
New Revision: 6777
Modified:
trunk/mapbender/lib/class_Filter.php
Log:
correct formatting for LIKE
Modified: trunk/mapbender/lib/class_Filter.php
===================================================================
--- trunk/mapbender/lib/class_Filter.php 2010-08-20 12:04:03 UTC (rev 6776)
+++ trunk/mapbender/lib/class_Filter.php 2010-08-20 12:31:03 UTC (rev 6777)
@@ -101,7 +101,7 @@
}
else {
$sqlObject->sql = !is_null($this->key) && !is_null($this->operator) ?
- $this->key . $this->operator . "$" . $parameterCount :
+ $this->key . " " . $this->operator . " $" . $parameterCount :
(!is_null($this->value) ? $this->value : "");
$sqlObject->v = !is_null($this->key) && !is_null($this->operator) && !is_null($this->value) ?
array($this->value) : array();
@@ -112,25 +112,6 @@
}
}
- public static function merge ($booleanOperator, $filterArray) {
- if (!in_array($booleanOperator, explode(",", Filter::BOOLEAN_OPERATORS))) {
- throw new Exception ("Filter: Invalid boolean operator " . $booleanOperator);
- }
-
- $validFilterArray = array();
- if (is_array($filterArray)) {
- foreach ($filterArray as $filter) {
- if (!is_a($filter, "Filter")) {
- continue;
- }
- $validFilterArray[]= $filter;
- }
- }
- return count($validFilterArray) > 0 ?
- count($validFilterArray) === 1 ? $validFilterArray[0] : new Filter($booleanOperator, $validFilterArray)
- : null;
- }
-
protected function isComplex () {
if (in_array($this->booleanOperator, explode(",", Filter::BOOLEAN_OPERATORS)) &&
is_array($this->filterArray)
More information about the Mapbender_commits
mailing list