Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263034

Change subject: Minor cleanup
......................................................................

Minor cleanup

Applied some cleanup from I9ff808430cd91125554a167071db4b25944f9f42

Change-Id: I8984605fc228acf5533c47eb3ec086b8739c2fd1
---
M Kartographer.hooks.php
1 file changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/34/263034/1

diff --git a/Kartographer.hooks.php b/Kartographer.hooks.php
index 7fa2abe..ccb5310 100644
--- a/Kartographer.hooks.php
+++ b/Kartographer.hooks.php
@@ -144,13 +144,16 @@
                                // Optional query value:  ? data = 
{title}|{group1}|{group2}|...
                                global $wgKartographerMapServer, 
$wgKartographerSrcsetScales;
 
-                               $statParams = sprintf( 
'%s/img/%s,%s,%s,%s,%sx%s', $wgKartographerMapServer, $style,
-                                               $zoom, $lat, $lon, $width, 
$height );
-                               $attrs = array(
-                                               'class' => 
'mw-kartographer-img',
-                                               'src' => $statParams . '.jpeg' 
. $dataParam,
-                                               'width' => $width,
-                                               'height' => $height,
+                               $statParams = sprintf( 
'%s/img/%s,%s,%s,%s,%sx%s',
+                                       $wgKartographerMapServer, $style,
+                                       $zoom, $lat, $lon, $width, $height
+                               );
+
+                               $imgAttrs = array(
+                                       'class' => 'mw-kartographer-img',
+                                       'src' => $statParams . '.jpeg' . 
$dataParam,
+                                       'width' => $width,
+                                       'height' => $height,
                                );
                                if ( $wgKartographerSrcsetScales ) {
                                        $srcSet = array();
@@ -158,21 +161,21 @@
                                                $s = '@' . $scale . 'x';
                                                $srcSet[$scale] = $statParams . 
$s . '.jpeg' . $dataParam;
                                        }
-                                       $attrs['srcset'] = Html::srcSet( 
$srcSet );
+                                       $imgAttrs['srcset'] = Html::srcSet( 
$srcSet );
                                }
 
                                $output->addModules( 'ext.kartographer.static' 
);
-                               $html = Html::rawElement( 'img', $attrs );
+                               $html = Html::rawElement( 'img', $imgAttrs );
                                break;
 
                        case 'interactive':
                                $attrs = array(
-                                               'class' => 
'mw-kartographer-live',
-                                               'style' => 
"width:${width}px;height:${height}px",
-                                               'data-style' => $style,
-                                               'data-zoom' => $zoom,
-                                               'data-lat' => $lat,
-                                               'data-lon' => $lon,
+                                       'class' => 'mw-kartographer-live',
+                                       'style' => 
"width:${width}px;height:${height}px;",
+                                       'data-style' => $style,
+                                       'data-zoom' => $zoom,
+                                       'data-lat' => $lat,
+                                       'data-lon' => $lon,
                                );
                                if ( $groups ) {
                                        $attrs['data-overlays'] = 
FormatJson::encode( $groups, false,

-- 
To view, visit https://gerrit.wikimedia.org/r/263034
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8984605fc228acf5533c47eb3ec086b8739c2fd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to