Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -34,8 +34,8 @@ |
35 | 35 | $egMapsFeatures['pf'][] = 'MapsDisplayPoint::initialize'; |
36 | 36 | |
37 | 37 | # Required for #coordinates. |
38 | | - $wgHooks['ParserFirstCallInit'][] = 'MapsCoordinates::staticInit';//array( 'MapsCoordinates', 'staticInit' ); |
39 | | - $wgHooks['LanguageGetMagic'][] = 'MapsCoordinates::staticMagic';// array( 'MapsCoordinates', 'staticMagic' );//; |
| 38 | + $wgHooks['ParserFirstCallInit'][] = 'MapsCoordinates::staticInit'; |
| 39 | + $wgHooks['LanguageGetMagic'][] = 'MapsCoordinates::staticMagic'; |
40 | 40 | # Required for #display_map. |
41 | 41 | $wgHooks['ParserFirstCallInit'][] = 'MapsDisplayMap::staticInit'; |
42 | 42 | $wgHooks['LanguageGetMagic'][] = 'MapsDisplayMap::staticMagic'; |
Index: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php |
— | — | @@ -136,18 +136,18 @@ |
137 | 137 | } |
138 | 138 | |
139 | 139 | // If there is no point specific icon, use the general icon parameter when available. |
140 | | - if ( !array_key_exists( 'icon', $markerData ) && $this->icon != '' ) { |
| 140 | + if ( !array_key_exists( 'icon', $markerData ) ) { |
141 | 141 | $markerData['icon'] = $this->icon; |
142 | 142 | } |
143 | 143 | |
144 | | - // Get the url for the icon when there is one, else set the icon to an empty string. |
145 | | - if ( array_key_exists( 'icon', $markerData ) ) { |
146 | | - $icon_image_page = new ImagePage( Title::newFromText( $markerData['icon'] ) ); |
147 | | - $markerData['icon'] = $icon_image_page->getDisplayedFile()->getURL(); |
| 144 | + if ( $markerData['icon'] != '' ) { |
| 145 | + $title = Title::newFromText( $markerData['icon'] ); |
| 146 | + |
| 147 | + if ( !is_null( $title ) && $title->exists() ) { |
| 148 | + $iconImagePage = new ImagePage( $title ); |
| 149 | + $markerData['icon'] = $iconImagePage->getDisplayedFile()->getURL(); |
| 150 | + } |
148 | 151 | } |
149 | | - else { |
150 | | - $markerData['icon'] = ''; |
151 | | - } |
152 | 152 | |
153 | 153 | // Temporary fix, will refactor away later |
154 | 154 | // TODO |