r87282 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87281‎ | r87282 | r87283 >
Date:19:20, 2 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix zoom level bug
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php
@@ -114,6 +114,13 @@
115115 global $wgParser;
116116
117117 $params = $validator->getParameterValues();
 118+
 119+ // We can only take care of the zoom defaulting here,
 120+ // as not all locations are available in whats passed to Validator.
 121+ if ( $params['zoom'] === false && count( $params['locations'] ) <= 1 ) {
 122+ $params['zoom'] = $this->service->getDefaultZoom();
 123+ }
 124+
118125 $mapName = $this->service->getMapId();
119126
120127 $params['inputname'] = $input_name;

Status & tagging log