r69618 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69617‎ | r69618 | r69619 >
Date:14:56, 20 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Spatial extensions support, or maybe not...
Modified paths:
  • /trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php (modified) (history)
  • /trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsForms.js
@@ -41,7 +41,7 @@
4242 }
4343
4444 /**
45 - * This function holds specific functionality for the Google Maps form input of Semantic Maps
 45+ * This function holds specific functionality for the Google Maps form input of Semantic Maps.
4646 */
4747 function showGAddress(address, mapName, outputElementName, notFoundFormat) {
4848 var map = GMaps[mapName];
Index: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
@@ -143,12 +143,15 @@
144144
145145 $isEq = $this->getComparator() == SMW_CMP_EQ;
146146
147 - $conditions = array();
148147
 148+
149149 if ( $smgUseSpatialExtensions ) {
150150 // TODO
 151+ $sql = '';
151152 }
152153 else {
 154+ $conditions = array();
 155+
153156 $smallerThen = $isEq ? '<' : '>=';
154157 $biggerThen = $isEq ? '>' : '<=';
155158 $joinCond = $isEq ? '&&' : '||';
@@ -156,10 +159,12 @@
157160 $conditions[] = "{$tableName}.$fieldNames[0] $smallerThen $north";
158161 $conditions[] = "{$tableName}.$fieldNames[0] $biggerThen $south";
159162 $conditions[] = "{$tableName}.$fieldNames[1] $smallerThen $east";
160 - $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west";
 163+ $conditions[] = "{$tableName}.$fieldNames[1] $biggerThen $west";
 164+
 165+ $sql = implode( " $joinCond ", $conditions );
161166 }
162167
163 - return implode( " $joinCond ", $conditions );
 168+ return $sql;
164169 }
165170
166171 /**
Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php
@@ -196,8 +196,7 @@
197197 global $smgUseSpatialExtensions, $smgQPCoodFormat, $smgQPCoodDirectional;
198198
199199 if ( $smgUseSpatialExtensions ) {
200 - //die(__METHOD__);
201 - //var_dump($args);exit;
 200+ // var_dump($args);exit;
202201 }
203202 else {
204203 $this->coordinateSet['lat'] = $args[0];

Status & tagging log