r66284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66283‎ | r66284 | r66285 >
Date:19:33, 12 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6 - fixed issue caused by change in smw
Modified paths:
  • /trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
@@ -38,7 +38,7 @@
3939 'lat' => $dbKeys[0],
4040 'lon' => $dbKeys[1]
4141 ),
42 - $radius
 42+ $radius * 1000
4343 );
4444 }
4545 }
@@ -89,13 +89,11 @@
9090 * @return An associative array containing the limits with keys north, east, south and west.
9191 */
9292 private static function getBoundingBox( array $centerCoordinates, $circleRadius ) {
93 - $centerCoordinates = array('lat' => 0, 'lon' => 0);
94 - var_dump($centerCoordinates);
9593 $north = MapsGeoFunctions::findDestination( $centerCoordinates, 0, $circleRadius );
9694 $east = MapsGeoFunctions::findDestination( $centerCoordinates, 90, $circleRadius );
9795 $south = MapsGeoFunctions::findDestination( $centerCoordinates, 180, $circleRadius );
9896 $west = MapsGeoFunctions::findDestination( $centerCoordinates, 270, $circleRadius );
99 -var_dump($north);var_dump($east);var_dump($south);var_dump($west);exit;
 97+
10098 return array(
10199 'north' => $north['lat'],
102100 'east' => $east['lon'],
@@ -127,8 +125,8 @@
128126 // the description is valid, and the near comparator is used.
129127 if ( $dataValue->getTypeID() != '_geo'
130128 || !$dataValue->isValid()
131 - ) return true;
132 -
 129+ ) return false;
 130+
133131 $boundingBox = $this->getBounds();
134132
135133 $north = $dbs->addQuotes( $boundingBox['north'] );
@@ -143,8 +141,6 @@
144142 $conditions[] = "{$tableName}.{$fieldNames[1]} < $east";
145143 $conditions[] = "{$tableName}.{$fieldNames[1]} > $west";
146144
147 - $whereSQL .= implode( ' && ', $conditions );
148 -
149 - return true;
 145+ return implode( ' && ', $conditions );
150146 }
151147 }
\ No newline at end of file

Status & tagging log