Index: trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispPoint.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | * @see MapsBaseMap::addSpecificMapHTML() |
50 | 50 | * |
51 | 51 | */ |
52 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 52 | + public function addSpecificMapHTML() { |
53 | 53 | global $egMapsGMaps3Prefix, $egGMaps3OnThisPage; |
54 | 54 | |
55 | 55 | $mapName = $egMapsGMaps3Prefix . '_' . $egGMaps3OnThisPage; |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | null |
65 | 65 | ); |
66 | 66 | |
67 | | - $parser->getOutput()->addHeadItem( |
| 67 | + $this->parser->getOutput()->addHeadItem( |
68 | 68 | Html::inlineScript( <<<EOT |
69 | 69 | addOnloadHook( |
70 | 70 | function() { |
Index: trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispMap.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | * @see MapsBaseMap::addSpecificMapHTML() |
48 | 48 | * |
49 | 49 | */ |
50 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 50 | + public function addSpecificMapHTML() { |
51 | 51 | global $egMapsGMaps3Prefix, $egGMaps3OnThisPage; |
52 | 52 | |
53 | 53 | $mapName = $egMapsGMaps3Prefix . '_' . $egGMaps3OnThisPage; |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | null |
62 | 62 | ); |
63 | 63 | |
64 | | - $parser->getOutput()->addHeadItem( |
| 64 | + $this->parser->getOutput()->addHeadItem( |
65 | 65 | Html::inlineScript( <<<EOT |
66 | 66 | addOnloadHook( |
67 | 67 | function() { |
Index: trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispPoint.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | * @see MapsBaseMap::addSpecificMapHTML() |
48 | 48 | * |
49 | 49 | */ |
50 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 50 | + public function addSpecificMapHTML() { |
51 | 51 | global $egMapsYahooMapsPrefix, $egYahooMapsOnThisPage; |
52 | 52 | |
53 | 53 | $mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage; |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | wfMsg( 'maps-loading-map' ) |
62 | 62 | ); |
63 | 63 | |
64 | | - $parser->getOutput()->addHeadItem( |
| 64 | + $this->parser->getOutput()->addHeadItem( |
65 | 65 | Html::inlineScript( <<<EOT |
66 | 66 | addOnloadHook( |
67 | 67 | function() { |
Index: trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispMap.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | /** |
39 | 39 | * @see MapsBaseMap::addSpecificMapHTML() |
40 | 40 | */ |
41 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 41 | + public function addSpecificMapHTML() { |
42 | 42 | global $egMapsYahooMapsPrefix, $egYahooMapsOnThisPage; |
43 | 43 | |
44 | 44 | $mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage; |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | wfMsg( 'maps-loading-map' ) |
53 | 53 | ); |
54 | 54 | |
55 | | - $parser->getOutput()->addHeadItem( |
| 55 | + $this->parser->getOutput()->addHeadItem( |
56 | 56 | Html::inlineScript( <<<EOT |
57 | 57 | addOnloadHook( |
58 | 58 | function() { |
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispPoint.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | * @see MapsBaseMap::addSpecificMapHTML() |
48 | 48 | * |
49 | 49 | */ |
50 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 50 | + public function addSpecificMapHTML() { |
51 | 51 | global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage; |
52 | 52 | |
53 | 53 | $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies( $this->output, $this->layers ); |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | wfMsg( 'maps-loading-map' ) |
64 | 64 | ); |
65 | 65 | |
66 | | - $parser->getOutput()->addHeadItem( |
| 66 | + $this->parser->getOutput()->addHeadItem( |
67 | 67 | Html::inlineScript( <<<EOT |
68 | 68 | addOnloadHook( |
69 | 69 | function() { |
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispMap.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | /** |
39 | 39 | * @see MapsBaseMap::addSpecificMapHTML() |
40 | 40 | */ |
41 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 41 | + public function addSpecificMapHTML() { |
42 | 42 | global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage; |
43 | 43 | |
44 | 44 | $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies( $this->output, $this->layers ); |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | wfMsg( 'maps-loading-map' ) |
55 | 55 | ); |
56 | 56 | |
57 | | - $parser->getOutput()->addHeadItem( |
| 57 | + $this->parser->getOutput()->addHeadItem( |
58 | 58 | Html::inlineScript( <<<EOT |
59 | 59 | addOnloadHook( |
60 | 60 | function() { |
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | /** |
60 | 60 | * @see MapsBaseMap::addSpecificMapHTML() |
61 | 61 | */ |
62 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 62 | + public function addSpecificMapHTML() { |
63 | 63 | global $egMapsGoogleMapsPrefix, $egGoogleMapsOnThisPage; |
64 | 64 | |
65 | 65 | $mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage; |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | wfMsg( 'maps-loading-map' ) |
76 | 76 | ); |
77 | 77 | |
78 | | - $parser->getOutput()->addHeadItem( |
| 78 | + $this->parser->getOutput()->addHeadItem( |
79 | 79 | Html::inlineScript( <<<EOT |
80 | 80 | addOnloadHook( |
81 | 81 | function() { |
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | /** |
63 | 63 | * @see MapsBaseMap::addSpecificMapHTML() |
64 | 64 | */ |
65 | | - public function addSpecificMapHTML( Parser $parser ) { |
| 65 | + public function addSpecificMapHTML() { |
66 | 66 | global $egMapsGoogleMapsPrefix, $egGoogleMapsOnThisPage; |
67 | 67 | |
68 | 68 | $mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage; |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | wfMsg( 'maps-loading-map' ) |
79 | 79 | ); |
80 | 80 | |
81 | | - $parser->getOutput()->addHeadItem( |
| 81 | + $this->parser->getOutput()->addHeadItem( |
82 | 82 | Html::inlineScript( |
83 | 83 | <<<EOT |
84 | 84 | addOnloadHook( |
Index: trunk/extensions/Maps/Features/DisplayPoint/Maps_BasePointMap.php |
— | — | @@ -106,13 +106,15 @@ |
107 | 107 | * @return html |
108 | 108 | */ |
109 | 109 | public final function getMapHtml( Parser &$parser, array $params ) { |
| 110 | + $this->parser = $parser; |
| 111 | + |
110 | 112 | $this->featureParameters = MapsDisplayPoint::$parameters; |
111 | 113 | |
112 | 114 | $this->doMapServiceLoad(); |
113 | 115 | |
114 | 116 | $this->setMapProperties( $params ); |
115 | 117 | |
116 | | - $this->setMarkerData( $parser ); |
| 118 | + $this->setMarkerData(); |
117 | 119 | |
118 | 120 | $this->createMarkerString(); |
119 | 121 | |
— | — | @@ -122,19 +124,17 @@ |
123 | 125 | $this->zoom = $this->getDefaultZoom(); |
124 | 126 | } |
125 | 127 | |
126 | | - $this->addSpecificMapHTML( $parser ); |
| 128 | + $this->addSpecificMapHTML(); |
127 | 129 | |
128 | 130 | return $this->output; |
129 | 131 | } |
130 | 132 | |
131 | 133 | /** |
132 | 134 | * Fills the $markerData array with the locations and their meta data. |
133 | | - * |
134 | | - * @param unknown_type $parser |
135 | 135 | */ |
136 | | - private function setMarkerData( $parser ) { |
137 | | - $this->title = Xml::escapeJsString( $parser->recursiveTagParse( $this->title ) ); |
138 | | - $this->label = Xml::escapeJsString( $parser->recursiveTagParse( $this->label ) ); |
| 136 | + private function setMarkerData() { |
| 137 | + $this->title = Xml::escapeJsString( $this->parser->recursiveTagParse( $this->title ) ); |
| 138 | + $this->label = Xml::escapeJsString( $this->parser->recursiveTagParse( $this->label ) ); |
139 | 139 | |
140 | 140 | foreach ( $this->coordinates as $coordinates ) { |
141 | 141 | $args = explode( '~', $coordinates ); |
— | — | @@ -145,11 +145,11 @@ |
146 | 146 | |
147 | 147 | if ( count( $args ) > 1 ) { |
148 | 148 | // Parse and add the point specific title if it's present. |
149 | | - $markerData['title'] = $parser->recursiveTagParse( $args[1] ); |
| 149 | + $markerData['title'] = $this->parser->recursiveTagParse( $args[1] ); |
150 | 150 | |
151 | 151 | if ( count( $args ) > 2 ) { |
152 | 152 | // Parse and add the point specific label if it's present. |
153 | | - $markerData['label'] = $parser->recursiveTagParse( $args[2] ); |
| 153 | + $markerData['label'] = $this->parser->recursiveTagParse( $args[2] ); |
154 | 154 | |
155 | 155 | if ( count( $args ) > 3 ) { |
156 | 156 | // Add the point specific icon if it's present. |
Index: trunk/extensions/Maps/Features/Maps_iMapParserFunction.php |
— | — | @@ -31,6 +31,6 @@ |
32 | 32 | /** |
33 | 33 | * Adds the HTML specific to the mapping service to the output. |
34 | 34 | */ |
35 | | - function addSpecificMapHTML( Parser $parser ); |
| 35 | + function addSpecificMapHTML(); |
36 | 36 | } |
37 | 37 | |
Index: trunk/extensions/Maps/Features/DisplayMap/Maps_BaseMap.php |
— | — | @@ -30,6 +30,8 @@ |
31 | 31 | |
32 | 32 | protected $output = ''; |
33 | 33 | |
| 34 | + protected $parser; |
| 35 | + |
34 | 36 | protected $spesificParameters = false; |
35 | 37 | protected $featureParameters = false; |
36 | 38 | |
— | — | @@ -88,6 +90,8 @@ |
89 | 91 | * @return html |
90 | 92 | */ |
91 | 93 | public final function getMapHtml( Parser &$parser, array $params ) { |
| 94 | + $this->parser = $parser; |
| 95 | + |
92 | 96 | $this->featureParameters = MapsDisplayMap::$parameters; |
93 | 97 | |
94 | 98 | $this->doMapServiceLoad(); |
— | — | @@ -100,7 +104,7 @@ |
101 | 105 | $this->zoom = $this->getDefaultZoom(); |
102 | 106 | } |
103 | 107 | |
104 | | - $this->addSpecificMapHTML( $parser ); |
| 108 | + $this->addSpecificMapHTML(); |
105 | 109 | |
106 | 110 | return $this->output; |
107 | 111 | } |