Index: branches/SemanticMaps0.7.x/RELEASE-NOTES |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | === Semantic Maps 0.7.8 === |
12 | 12 | |
13 | 13 | * Fixed PostGres support for distance queries. |
| 14 | +* Switched around getShort and getLong Wiki/HTML text methods in the geocoords DV. |
14 | 15 | |
15 | 16 | === Semantic Maps 0.7.7 === |
16 | 17 | (2011-06-15) |
Index: branches/SemanticMaps0.7.x/includes/SM_GeoCoordsValue.php |
— | — | @@ -277,18 +277,12 @@ |
278 | 278 | * @since 0.6 |
279 | 279 | */ |
280 | 280 | public function getShortWikiText( $linked = null ) { |
281 | | - if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) { |
282 | | - SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
283 | | - |
284 | | - // TODO: fix lang keys so they include the space and coordinates. |
285 | | - |
286 | | - return '<span class="smwttinline">' . htmlspecialchars( $this->m_caption ) . '<span class="smwttcontent">' . |
287 | | - htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $this->coordinateSet['lat'] ) . '<br />' . |
288 | | - htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $this->coordinateSet['lon'] ) . |
289 | | - '</span></span>'; |
| 281 | + if ( !$this->isValid() ) { |
| 282 | + return $this->getErrorText(); |
290 | 283 | } |
291 | 284 | else { |
292 | | - return htmlspecialchars( $this->m_caption ); |
| 285 | + global $smgQPCoodFormat, $smgQPCoodDirectional; |
| 286 | + return MapsCoordinateParser::formatCoordinates( $this->coordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ); |
293 | 287 | } |
294 | 288 | } |
295 | 289 | |
— | — | @@ -307,12 +301,18 @@ |
308 | 302 | * @since 0.6 |
309 | 303 | */ |
310 | 304 | public function getLongWikiText( $linked = null ) { |
311 | | - if ( !$this->isValid() ) { |
312 | | - return $this->getErrorText(); |
| 305 | + if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) { |
| 306 | + SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
| 307 | + |
| 308 | + // TODO: fix lang keys so they include the space and coordinates. |
| 309 | + |
| 310 | + return '<span class="smwttinline">' . htmlspecialchars( $this->m_caption ) . '<span class="smwttcontent">' . |
| 311 | + htmlspecialchars ( wfMsgForContent( 'maps-latitude' ) . ' ' . $this->coordinateSet['lat'] ) . '<br />' . |
| 312 | + htmlspecialchars ( wfMsgForContent( 'maps-longitude' ) . ' ' . $this->coordinateSet['lon'] ) . |
| 313 | + '</span></span>'; |
313 | 314 | } |
314 | 315 | else { |
315 | | - global $smgQPCoodFormat, $smgQPCoodDirectional; |
316 | | - return MapsCoordinateParser::formatCoordinates( $this->coordinateSet, $smgQPCoodFormat, $smgQPCoodDirectional ); |
| 316 | + return htmlspecialchars( $this->m_caption ); |
317 | 317 | } |
318 | 318 | } |
319 | 319 | |