r67956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67955‎ | r67956 | r67957 >
Date:16:14, 13 June 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6.3 - Fixed header item bug that occurred on SF query pages with maps
Modified paths:
  • /trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php
@@ -33,9 +33,8 @@
3434 * @see SMMapPrinter::doMapServiceLoad()
3535 */
3636 protected function doMapServiceLoad() {
37 - global $egYahooMapsOnThisPage, $wgParser;
 37+ global $egYahooMapsOnThisPage;
3838
39 - $this->mService->addDependencies( $wgParser );
4039 $egYahooMapsOnThisPage++;
4140
4241 $this->elementNr = $egYahooMapsOnThisPage;
Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php
@@ -21,7 +21,6 @@
2222
2323 /**
2424 * @see SMMapPrinter::setQueryPrinterSettings()
25 - *
2625 */
2726 protected function setQueryPrinterSettings() {
2827 global $egMapsOpenLayersZoom, $egMapsOpenLayersPrefix;
@@ -32,12 +31,10 @@
3332
3433 /**
3534 * @see SMMapPrinter::doMapServiceLoad()
36 - *
3735 */
3836 protected function doMapServiceLoad() {
39 - global $wgParser, $egOpenLayersOnThisPage;
 37+ global $egOpenLayersOnThisPage;
4038
41 - $this->mService->addDependencies( $wgParser);
4239 $egOpenLayersOnThisPage++;
4340
4441 $this->elementNr = $egOpenLayersOnThisPage;
@@ -45,7 +42,6 @@
4643
4744 /**
4845 * @see SMMapPrinter::addSpecificMapHTML()
49 - *
5046 */
5147 protected function addSpecificMapHTML( Parser $parser ) {
5248 // TODO: refactor up like done in maps with display point
Index: trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php
@@ -45,12 +45,7 @@
4646 * @see SMMapPrinter::doMapServiceLoad()
4747 */
4848 protected function doMapServiceLoad() {
49 - global $wgParser, $egGoogleMapsOnThisPage;
50 -
51 - if ( empty( $egGoogleMapsOnThisPage ) ) {
52 - $egGoogleMapsOnThisPage = 0;
53 - $this->mService->addDependencies( $wgParser );
54 - }
 49+ global $egGoogleMapsOnThisPage;
5550
5651 $egGoogleMapsOnThisPage++;
5752
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
@@ -92,6 +92,10 @@
9393 if ( count( $this->mLocations ) > 0 || $this->forceshow ) {
9494 $this->doMapServiceLoad();
9595
 96+ $dependencies = $this->mService->getDependencyHtml();
 97+ $hash = md5( $dependencies );
 98+ SMWOutputs::requireHeadItem( $hash, $dependencies );
 99+
96100 $this->setMapName();
97101
98102 $this->setZoom();
@@ -150,7 +154,7 @@
151155 */
152156 private function setMapProperties( array $mapProperties ) {
153157 foreach ( $mapProperties as $paramName => $paramValue ) {
154 - if ( ! property_exists( __CLASS__, $paramName ) ) {
 158+ if ( !property_exists( __CLASS__, $paramName ) ) {
155159 $this-> { $paramName } = $paramValue;
156160 }
157161 else {

Status & tagging log