r49667 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49666‎ | r49667 | r49668 >
Date:17:01, 20 April 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added getName() method, fixed bug in setting of coordinates
Modified paths:
  • /trunk/extensions/SemanticGoogleMaps/SGM_QueryPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticGoogleMaps/SGM_QueryPrinter.php
@@ -10,6 +10,11 @@
1111
1212 class SGMResultPrinter extends SMWResultPrinter {
1313
 14+ public function getName() {
 15+ wfLoadExtensionMessages('SemanticGoogleMaps');
 16+ return wfMsg('semanticgooglemaps_printername');
 17+ }
 18+
1419 public function getResult($results, $params, $outputmode) {
1520 // skip checks, results with 0 entries are normal
1621 $this->readParameters($params, $outputmode);
@@ -26,9 +31,9 @@
2732 // print all result rows
2833 while ( $row = $res->getNext() ) {
2934 $lat = $lon = $title = $text = $icon = "";
 35+ $coords_for_page = array();
3036 foreach ($row as $i => $field) {
3137 $pr = $field->getPrintRequest();
32 - $coords_for_page = array();
3338 while ( ($object = $field->getNextObject()) !== false ) {
3439 if ($object->getTypeID() == '_geo') { // use shorter "LongText" for wikipage
3540 // don't add geographical coordinates to the display

Status & tagging log