Index: trunk/extensions/SemanticResultFormats/Outline/SRF_Outline.php |
— | — | @@ -32,7 +32,6 @@ |
33 | 33 | if ( array_key_exists( $field_name, $this->mVals ) ) |
34 | 34 | return $this->mVals[$field_name]; |
35 | 35 | else { |
36 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
37 | 36 | return array( wfMsg( 'srf_outline_novalue' ) ); |
38 | 37 | } |
39 | 38 | } |
Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php |
— | — | @@ -53,7 +53,6 @@ |
54 | 54 | } |
55 | 55 | |
56 | 56 | public function getName() { |
57 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
58 | 57 | return wfMsg( 'srf_printername_icalendar' ); |
59 | 58 | } |
60 | 59 | |
— | — | @@ -119,7 +118,6 @@ |
120 | 119 | if ( $this->getSearchLabel( $outputmode ) ) { |
121 | 120 | $label = $this->getSearchLabel( $outputmode ); |
122 | 121 | } else { |
123 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
124 | 122 | $label = wfMsgForContent( 'srf_icalendar_link' ); |
125 | 123 | } |
126 | 124 | |
Index: trunk/extensions/SemanticResultFormats/SemanticResultFormats.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
24 | | -define( 'SRF_VERSION', '1.5.2' ); |
| 24 | +define( 'SRF_VERSION', '1.5.3 alpha' ); |
25 | 25 | |
26 | 26 | // Require the settings file. |
27 | 27 | require dirname( __FILE__ ) . '/SRF_Settings.php'; |
— | — | @@ -46,6 +46,8 @@ |
47 | 47 | // FIXME: Can be removed when new style magic words are used (introduced in r52503) |
48 | 48 | $wgHooks['LanguageGetMagic'][] = 'SRFParserFunctions::languageGetMagic'; |
49 | 49 | |
| 50 | +$wgExtensionFunctions[] = 'efSRFSetup'; |
| 51 | + |
50 | 52 | $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array( |
51 | 53 | 'path' => __FILE__, |
52 | 54 | 'name' => 'Semantic Result Formats', |
— | — | @@ -60,7 +62,8 @@ |
61 | 63 | 'David Loomer', |
62 | 64 | '[http://simia.net Denny Vrandecic]', |
63 | 65 | 'Hans-Jörg Happel', |
64 | | - 'Rowan Rodrik van der Molen' |
| 66 | + 'Rowan Rodrik van der Molen', |
| 67 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' |
65 | 68 | ), |
66 | 69 | 'url' => 'http://semantic-mediawiki.org/wiki/Help:Semantic_Result_Formats', |
67 | 70 | 'descriptionmsg' => 'srf-desc' |
— | — | @@ -131,6 +134,25 @@ |
132 | 135 | } |
133 | 136 | |
134 | 137 | /** |
| 138 | + * Extension initialization hook. |
| 139 | + * |
| 140 | + * @since 0.5.3 |
| 141 | + * |
| 142 | + * @return true |
| 143 | + */ |
| 144 | +function efSRFSetup() { |
| 145 | + global $wgVersion; |
| 146 | + |
| 147 | + // This function has been deprecated in 1.16, but needed for earlier versions. |
| 148 | + // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point. |
| 149 | + if ( version_compare( $wgVersion, '1.15', '<=' ) ) { |
| 150 | + wfLoadExtensionMessages( 'SemanticResultFormats' ); |
| 151 | + } |
| 152 | + |
| 153 | + return true; |
| 154 | +} |
| 155 | + |
| 156 | +/** |
135 | 157 | * Adds a link to Admin Links page. |
136 | 158 | */ |
137 | 159 | function srffAddToAdminLinks( &$admin_links_tree ) { |
— | — | @@ -142,7 +164,6 @@ |
143 | 165 | } |
144 | 166 | |
145 | 167 | $smw_docu_row = $displaying_data_section->getRow( 'smw' ); |
146 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
147 | 168 | $srf_docu_label = wfMsg( 'adminlinks_documentation', wfMsg( 'srf-name' ) ); |
148 | 169 | $smw_docu_row->addItem( AlItem::newFromExternalLink( 'http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats', $srf_docu_label ) ); |
149 | 170 | |
Index: trunk/extensions/SemanticResultFormats/Math/SRF_Math.php |
— | — | @@ -14,7 +14,6 @@ |
15 | 15 | class SRFMath extends SMWResultPrinter { |
16 | 16 | |
17 | 17 | public function getName() { |
18 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
19 | 18 | return wfMsg( 'srf_printername_' . $this->mFormat ); |
20 | 19 | } |
21 | 20 | |
Index: trunk/extensions/SemanticResultFormats/Exhibit/SRF_Exhibit.php |
— | — | @@ -50,9 +50,6 @@ |
51 | 51 | |
52 | 52 | global $smwgIQRunningNumber, $wgScriptPath, $wgGoogleMapsKey, $smwgScriptPath, $srfgIP, $srfgScriptPath; |
53 | 53 | |
54 | | - wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
55 | | - |
56 | | - |
57 | 54 | // ////////////////////////////// |
58 | 55 | // ///////REMOTE STUFF/////////// |
59 | 56 | // ////////////////////////////// |
Index: trunk/extensions/SemanticResultFormats/vCard/SRF_vCard.php |
— | — | @@ -33,7 +33,6 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getName() { |
37 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
38 | 37 | return wfMsg( 'srf_printername_vcard' ); |
39 | 38 | } |
40 | 39 | |
— | — | @@ -316,7 +315,6 @@ |
317 | 316 | if ( $this->getSearchLabel( $outputmode ) ) { |
318 | 317 | $label = $this->getSearchLabel( $outputmode ); |
319 | 318 | } else { |
320 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
321 | 319 | $label = wfMsgForContent( 'srf_vcard_link' ); |
322 | 320 | } |
323 | 321 | $link = $res->getQueryLink( $label ); |
Index: trunk/extensions/SemanticResultFormats/Gallery/SRF_Gallery.php |
— | — | @@ -16,7 +16,6 @@ |
17 | 17 | |
18 | 18 | public function getName() |
19 | 19 | { |
20 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
21 | 20 | return wfMsg( 'srf_printername_gallery' ); |
22 | 21 | } |
23 | 22 | |
Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php |
— | — | @@ -34,7 +34,6 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function getName() { |
38 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
39 | 38 | return wfMsg( 'srf_printername_calendar' ); |
40 | 39 | } |
41 | 40 | |
— | — | @@ -214,7 +213,6 @@ |
215 | 214 | 'media' => "screen, print", |
216 | 215 | 'href' => $srfgScriptPath . "/Calendar/skins/SRFC_main.css" |
217 | 216 | ) ); |
218 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
219 | 217 | |
220 | 218 | // set variables differently depending on whether this is |
221 | 219 | // being called from an #ask call or the Special:Ask page |
Index: trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php |
— | — | @@ -50,7 +50,6 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | public function getName() { |
54 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
55 | 54 | return wfMsg( 'srf_printername_bibtex' ); |
56 | 55 | } |
57 | 56 | |
— | — | @@ -287,7 +286,6 @@ |
288 | 287 | if ( $this->getSearchLabel( $outputmode ) ) { |
289 | 288 | $label = $this->getSearchLabel( $outputmode ); |
290 | 289 | } else { |
291 | | - wfLoadExtensionMessages( 'SemanticResultFormats' ); |
292 | 290 | $label = wfMsgForContent( 'srf_bibtex_link' ); |
293 | 291 | } |
294 | 292 | $link = $res->getQueryLink( $label ); |