Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php |
— | — | @@ -248,21 +248,21 @@ |
249 | 249 | } |
250 | 250 | |
251 | 251 | /** |
252 | | - * @see SMWDataValue::getValueIndexes |
| 252 | + * @see SMWDataValue::getValueIndex |
253 | 253 | * |
254 | | - * @return array |
| 254 | + * @return integer |
255 | 255 | */ |
256 | | - public function getValueIndexes() { |
257 | | - return array( 0, 1 ); |
| 256 | + public function getValueIndex() { |
| 257 | + return 0; |
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
261 | | - * @see SMWDataValue::getLabelIndexes |
| 261 | + * @see SMWDataValue::getLabelIndex |
262 | 262 | * |
263 | | - * @return array |
| 263 | + * @return integer |
264 | 264 | */ |
265 | | - public function getLabelIndexes() { |
266 | | - return array( 0, 1 ); |
| 265 | + public function getLabelIndex() { |
| 266 | + return 0; |
267 | 267 | } |
268 | 268 | |
269 | 269 | } |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValueDescription.php |
— | — | @@ -47,12 +47,12 @@ |
48 | 48 | * @see SMWDescription::getSQLCondition |
49 | 49 | * |
50 | 50 | * @param string $tableName |
51 | | - * @param array $fieldNames |
| 51 | + * @param string $fieldName |
52 | 52 | * @param DatabaseBase $dbs |
53 | 53 | * |
54 | 54 | * @return true |
55 | 55 | */ |
56 | | - public function getSQLCondition( $tableName, array $fieldNames, DatabaseBase $dbs ) { |
| 56 | + public function getSQLCondition( $tableName, $fieldName, DatabaseBase $dbs ) { |
57 | 57 | $dataValue = $this->getDatavalue(); |
58 | 58 | |
59 | 59 | // Only execute the query when the description's type is geographical coordinates, |
— | — | @@ -68,8 +68,8 @@ |
69 | 69 | |
70 | 70 | // TODO: Would be safer to have a solid way of determining what's the lat and lon field, instead of assuming it's in this order. |
71 | 71 | $conditions = array(); |
72 | | - $conditions[] = "{$tableName}.{$fieldNames[0]} {$comparator} {$coordinates['lat']}"; |
73 | | - $conditions[] = "{$tableName}.{$fieldNames[1]} {$comparator} {$coordinates['lon']}"; |
| 72 | + $conditions[] = "{$tableName}.lat {$comparator} {$coordinates['lat']}"; |
| 73 | + $conditions[] = "{$tableName}.lon {$comparator} {$coordinates['lon']}"; |
74 | 74 | |
75 | 75 | $whereSQL .= implode( ' && ', $conditions ); |
76 | 76 | |
Index: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php |
— | — | @@ -137,12 +137,12 @@ |
138 | 138 | * @see SMWDescription::getSQLCondition |
139 | 139 | * |
140 | 140 | * @param string $tableName |
141 | | - * @param array $fieldNames |
| 141 | + * @param string $fieldName |
142 | 142 | * @param DatabaseBase $dbs |
143 | 143 | * |
144 | 144 | * @return true |
145 | 145 | */ |
146 | | - public function getSQLCondition( $tableName, array $fieldNames, DatabaseBase $dbs ) { |
| 146 | + public function getSQLCondition( $tableName, $fieldName, DatabaseBase $dbs ) { |
147 | 147 | $dataValue = $this->getDatavalue(); |
148 | 148 | |
149 | 149 | // Only execute the query when the description's type is geographical coordinates, |
— | — | @@ -160,10 +160,10 @@ |
161 | 161 | |
162 | 162 | // TODO: Would be safer to have a solid way of determining what's the lat and lon field, instead of assuming it's in this order. |
163 | 163 | $conditions = array(); |
164 | | - $conditions[] = "{$tableName}.{$fieldNames[0]} < $north"; |
165 | | - $conditions[] = "{$tableName}.{$fieldNames[0]} > $south"; |
166 | | - $conditions[] = "{$tableName}.{$fieldNames[1]} < $east"; |
167 | | - $conditions[] = "{$tableName}.{$fieldNames[1]} > $west"; |
| 164 | + $conditions[] = "{$tableName}.lat < $north"; |
| 165 | + $conditions[] = "{$tableName}.lat > $south"; |
| 166 | + $conditions[] = "{$tableName}.lon < $east"; |
| 167 | + $conditions[] = "{$tableName}.lon > $west"; |
168 | 168 | |
169 | 169 | return implode( ' && ', $conditions ); |
170 | 170 | } |