r67447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67446‎ | r67447 | r67448 >
Date:09:51, 6 June 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Code and docs improvements
Modified paths:
  • /trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
@@ -36,6 +36,12 @@
3737 }
3838 }
3939
 40+ /**
 41+ * Sets the mBounds fields to an array returned by SMAreaValueDescription::getBoundingBox.
 42+ *
 43+ * @param SMGeoCoordsValue $dataValue
 44+ * @param string $radius
 45+ */
4046 protected function calculateBounds( SMGeoCoordsValue $dataValue, $radius ) {
4147 $this->mBounds = self::getBoundingBox(
4248 $dataValue->getCoordinateSet(),
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
@@ -45,7 +45,7 @@
4646
4747 public $serviceName;
4848
49 - protected $m_locations = array();
 49+ protected $mLocations = array();
5050
5151 protected $defaultZoom;
5252
@@ -53,9 +53,9 @@
5454 protected $centreLon;
5555
5656 protected $output = '';
57 - protected $errorList;
 57+ protected $mErrorList;
5858
59 - protected $mapFeature;
 59+ protected $mMapFeature;
6060
6161 protected $featureParameters = array();
6262 protected $spesificParameters = array();
@@ -77,7 +77,7 @@
7878 $this->formatResultData( $res, $outputmode );
7979
8080 // Only create a map when there is at least one result.
81 - if ( count( $this->m_locations ) > 0 || $this->forceshow ) {
 81+ if ( count( $this->mLocations ) > 0 || $this->forceshow ) {
8282 $this->doMapServiceLoad();
8383
8484 $this->setMapName();
@@ -94,7 +94,7 @@
9595 }
9696 }
9797
98 - return array( $this->output . $this->errorList, 'noparse' => true, 'isHTML' => true );
 98+ return array( $this->output . $this->mErrorList, 'noparse' => true, 'isHTML' => true );
9999 }
100100
101101 /**
@@ -126,7 +126,7 @@
127127 $this->setMapProperties( $manager->getParameters( false ) );
128128 }
129129
130 - $this->errorList = $manager->getErrorList();
 130+ $this->mErrorList = $manager->getErrorList();
131131
132132 return $showMap;
133133 }
@@ -235,7 +235,7 @@
236236 $text = preg_replace( '/\n+/m', '<br />', $wgParser->recursiveTagParse( '{{' . implode( '|', $segments ) . '}}' ) );
237237 }
238238
239 - $this->m_locations[] = array(
 239+ $this->mLocations[] = array(
240240 Xml::escapeJsString( $lat ),
241241 Xml::escapeJsString( $lon ),
242242 Xml::escapeJsString( $title ),
@@ -291,7 +291,7 @@
292292 */
293293 private function setZoom() {
294294 if ( strlen( $this->zoom ) < 1 ) {
295 - if ( count( $this->m_locations ) > 1 ) {
 295+ if ( count( $this->mLocations ) > 1 ) {
296296 $this->zoom = 'null';
297297 }
298298 else {
@@ -314,15 +314,15 @@
315315 $this->centreLat = $centre['lat'];
316316 $this->centreLon = $centre['lon'];
317317 }
318 - elseif ( count( $this->m_locations ) > 1 ) {
 318+ elseif ( count( $this->mLocations ) > 1 ) {
319319 // If centre is not set, and there are multiple points, set the values to null, to be auto determined by the JS of the mapping API.
320320 $this->centreLat = 'null';
321321 $this->centreLon = 'null';
322322 }
323 - elseif ( count( $this->m_locations ) == 1 ) {
 323+ elseif ( count( $this->mLocations ) == 1 ) {
324324 // If centre is not set and there is exactelly one marker, use it's coordinates.
325 - $this->centreLat = Xml::escapeJsString( $this->m_locations[0][0] );
326 - $this->centreLon = Xml::escapeJsString( $this->m_locations[0][1] );
 325+ $this->centreLat = Xml::escapeJsString( $this->mLocations[0][0] );
 326+ $this->centreLon = Xml::escapeJsString( $this->mLocations[0][1] );
327327 }
328328 else {
329329 // If centre is not set and there are no results, centre on the default coordinates.

Status & tagging log