Index: trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php |
— | — | @@ -33,9 +33,8 @@ |
34 | 34 | * @see SMMapPrinter::doMapServiceLoad() |
35 | 35 | */ |
36 | 36 | protected function doMapServiceLoad() { |
37 | | - global $egYahooMapsOnThisPage, $wgParser; |
| 37 | + global $egYahooMapsOnThisPage; |
38 | 38 | |
39 | | - $this->mService->addDependencies( $wgParser ); |
40 | 39 | $egYahooMapsOnThisPage++; |
41 | 40 | |
42 | 41 | $this->elementNr = $egYahooMapsOnThisPage; |
Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -21,7 +21,6 @@ |
22 | 22 | |
23 | 23 | /** |
24 | 24 | * @see SMMapPrinter::setQueryPrinterSettings() |
25 | | - * |
26 | 25 | */ |
27 | 26 | protected function setQueryPrinterSettings() { |
28 | 27 | global $egMapsOpenLayersZoom, $egMapsOpenLayersPrefix; |
— | — | @@ -32,12 +31,10 @@ |
33 | 32 | |
34 | 33 | /** |
35 | 34 | * @see SMMapPrinter::doMapServiceLoad() |
36 | | - * |
37 | 35 | */ |
38 | 36 | protected function doMapServiceLoad() { |
39 | | - global $wgParser, $egOpenLayersOnThisPage; |
| 37 | + global $egOpenLayersOnThisPage; |
40 | 38 | |
41 | | - $this->mService->addDependencies( $wgParser); |
42 | 39 | $egOpenLayersOnThisPage++; |
43 | 40 | |
44 | 41 | $this->elementNr = $egOpenLayersOnThisPage; |
— | — | @@ -45,7 +42,6 @@ |
46 | 43 | |
47 | 44 | /** |
48 | 45 | * @see SMMapPrinter::addSpecificMapHTML() |
49 | | - * |
50 | 46 | */ |
51 | 47 | protected function addSpecificMapHTML( Parser $parser ) { |
52 | 48 | // TODO: refactor up like done in maps with display point |
Index: trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -45,12 +45,7 @@ |
46 | 46 | * @see SMMapPrinter::doMapServiceLoad() |
47 | 47 | */ |
48 | 48 | protected function doMapServiceLoad() { |
49 | | - global $wgParser, $egGoogleMapsOnThisPage; |
50 | | - |
51 | | - if ( empty( $egGoogleMapsOnThisPage ) ) { |
52 | | - $egGoogleMapsOnThisPage = 0; |
53 | | - $this->mService->addDependencies( $wgParser ); |
54 | | - } |
| 49 | + global $egGoogleMapsOnThisPage; |
55 | 50 | |
56 | 51 | $egGoogleMapsOnThisPage++; |
57 | 52 | |
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -92,6 +92,10 @@ |
93 | 93 | if ( count( $this->mLocations ) > 0 || $this->forceshow ) { |
94 | 94 | $this->doMapServiceLoad(); |
95 | 95 | |
| 96 | + $dependencies = $this->mService->getDependencyHtml(); |
| 97 | + $hash = md5( $dependencies ); |
| 98 | + SMWOutputs::requireHeadItem( $hash, $dependencies ); |
| 99 | + |
96 | 100 | $this->setMapName(); |
97 | 101 | |
98 | 102 | $this->setZoom(); |
— | — | @@ -150,7 +154,7 @@ |
151 | 155 | */ |
152 | 156 | private function setMapProperties( array $mapProperties ) { |
153 | 157 | foreach ( $mapProperties as $paramName => $paramValue ) { |
154 | | - if ( ! property_exists( __CLASS__, $paramName ) ) { |
| 158 | + if ( !property_exists( __CLASS__, $paramName ) ) { |
155 | 159 | $this-> { $paramName } = $paramValue; |
156 | 160 | } |
157 | 161 | else { |