Index: trunk/extensions/ContributionScores/ContributionScores_body.php |
— | — | @@ -138,10 +138,9 @@ |
139 | 139 | } |
140 | 140 | |
141 | 141 | function execute( $par ) { |
142 | | - global $wgRequest, $wgVersion, $wgOut, $wgHooks; |
| 142 | + global $wgRequest, $wgOut, $wgHooks; |
143 | 143 | |
144 | | - if( version_compare( $wgVersion, '1.11', '>=' ) ) |
145 | | - wfLoadExtensionMessages( 'ContributionScores' ); |
| 144 | + wfLoadExtensionMessages( 'ContributionScores' ); |
146 | 145 | |
147 | 146 | $this->setHeaders(); |
148 | 147 | |
Index: trunk/extensions/ContributionScores/ContributionScores.php |
— | — | @@ -33,28 +33,13 @@ |
34 | 34 | if( version_compare( $wgVersion, '1.13', '>=' ) ) { |
35 | 35 | $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php'; |
36 | 36 | $wgExtensionAliasesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.alias.php'; |
37 | | -} else if( version_compare( $wgVersion, '1.11', '>=' ) ) { |
38 | 37 | $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php'; |
39 | | -} else { |
40 | | - $wgExtensionFunctions[] = 'efContributionScores_AddMessages'; |
41 | 38 | } |
42 | 39 | |
43 | 40 | $wgHooks['LanguageGetMagic'][] = 'efContributionScores_LanguageGetMagic'; |
44 | 41 | |
45 | 42 | $wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup'; |
46 | 43 | |
47 | | -///Message Cache population for versions that did not support $wgExtensionFunctions |
48 | | -function efContributionScores_AddMessages() { |
49 | | - global $wgMessageCache; |
50 | | - |
51 | | - #Add Messages |
52 | | - require( CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php' ); |
53 | | - foreach( $messages as $key => $value ) { |
54 | | - $wgMessageCache->addMessages( $messages[$key], $key ); |
55 | | - } |
56 | | - return true; |
57 | | -} |
58 | | - |
59 | 44 | function efContributionScores_Setup( &$parser ) { |
60 | 45 | $parser->setFunctionHook( 'cscore', 'efContributionScores_Render' ); |
61 | 46 | return true; |
— | — | @@ -66,10 +51,9 @@ |
67 | 52 | } |
68 | 53 | |
69 | 54 | function efContributionScores_Render(&$parser, $usertext, $metric='score') { |
70 | | - global $wgContribScoreDisableCache, $wgVersion; |
| 55 | + global $wgContribScoreDisableCache; |
71 | 56 | |
72 | | - if( version_compare( $wgVersion, '1.11', '>=' ) ) |
73 | | - wfLoadExtensionMessages( 'ContributionScores' ); |
| 57 | + wfLoadExtensionMessages( 'ContributionScores' ); |
74 | 58 | |
75 | 59 | $output = ""; |
76 | 60 | |
Index: trunk/extensions/SmoothGallery/SmoothGalleryClass.php |
— | — | @@ -195,11 +195,8 @@ |
196 | 196 | continue; |
197 | 197 | } |
198 | 198 | |
199 | | - if ( version_compare( $wgVersion, "1.11", '<' ) ) { |
200 | | - $plain_gallery->add( $image["image_object"], $image["description"] ); // TODO: use text |
201 | | - } else { |
202 | | - $plain_gallery->add( $image["image_object"]->getTitle(), $image["description"] ); // TODO: use text |
203 | | - } |
| 199 | + $plain_gallery->add( $image["image_object"]->getTitle(), $image["description"] ); // TODO: use text |
| 200 | + |
204 | 201 | $i++; |
205 | 202 | } |
206 | 203 | |
Index: trunk/extensions/NewsChannel/NewsChannel_body.php |
— | — | @@ -37,16 +37,10 @@ |
38 | 38 | * @param string $par Custom parameters. |
39 | 39 | */ |
40 | 40 | function execute( $par ) { |
41 | | - global $wgRequest, $wgVersion, $wgOut, $wgNewsChannelCategory, $wgNewsChannelDefaultItems; |
| 41 | + global $wgRequest, $wgOut, $wgNewsChannelCategory, $wgNewsChannelDefaultItems; |
42 | 42 | |
43 | 43 | wfLoadExtensionMessages( 'NewsChannel' ); |
44 | 44 | |
45 | | - if( version_compare( $wgVersion, '1.8', '<' ) === true ) { |
46 | | - $wgOut->showErrorPage( "Error: Upgrade required", "The News Channel extension can't work " . |
47 | | - "on MediaWiki older than 1.8. Please, upgrade." ); |
48 | | - return; |
49 | | - } |
50 | | - |
51 | 45 | if( $wgNewsChannelCategory == '' || $wgNewsChannelCategory == null ) { |
52 | 46 | $wgOut->showErrorPage( "Error: Misconfiguration", "Main category containing news articles " . |
53 | 47 | "was not defined for News Channel extension. Please, define it." ); |
Index: trunk/extensions/GoogleMaps/GoogleMaps.php |
— | — | @@ -26,28 +26,6 @@ |
27 | 27 | require( 'extensions/GoogleMaps/SpecialGoogleMapsKML.php' ); |
28 | 28 | require( 'extensions/GoogleMaps/GoogleMaps.body.php' ); |
29 | 29 | |
30 | | -/** |
31 | | - * This function is for rendering a <googlemap> tag on MW 1.5. |
32 | | - * It cannot be an object function. (Compare to the render16 function |
33 | | - * of the GoogleMaps class.) |
34 | | - * |
35 | | - * @param $pContent string - the content of the <googlemap> tag |
36 | | - * @param $pArgv array - an array of attribute name/value pairs for the |
37 | | - * tag |
38 | | - * |
39 | | - * @return string - the HTML string to output for the <googlemap> tag |
40 | | - **/ |
41 | | -function wfGoogleMaps_Render15 ( $pContent, $pArgv ) { |
42 | | - global $wgGoogleMaps, $wgParser; |
43 | | - // get the global parser and pass through to the main render function |
44 | | - return $wgGoogleMaps->render( $pContent, $pArgv, $wgParser, $wgParser ); |
45 | | -} |
46 | | - |
47 | | -function wfGoogleMaps_RenderKmlLink15 ( $pContent, $pArgv ) { |
48 | | - global $wgGoogleMaps; |
49 | | - return $wgGoogleMaps->renderKmlLink( $pContent, $pArgv ); |
50 | | -} |
51 | | - |
52 | 30 | function wfGoogleMaps_CommentJS(&$pParser, &$pText) { |
53 | 31 | global $wgGoogleMaps; |
54 | 32 | return $wgGoogleMaps->commentJS($pParser, $pText); |
— | — | @@ -64,7 +42,7 @@ |
65 | 43 | global $wgGoogleMapsKey, $wgGoogleMapsKeys, $wgGoogleMapsDisableEditorsMap, $wgGoogleMapsEnablePaths, |
66 | 44 | $wgGoogleMapsDefaults, $wgGoogleMapsMessages, $wgGoogleMapsCustomMessages, $wgGoogleMapsUrlPath, |
67 | 45 | $wgXhtmlNamespaces, $wgGoogleMapsTemplateVariables, $wgJsMimeType, $wgLanguageCode, $wgContLang, |
68 | | - $wgParser, $wgProxyKey, $wgVersion, $wgGoogleMaps, $wgHooks, $wgScriptPath, $wgSpecialPages, |
| 46 | + $wgParser, $wgProxyKey, $wgGoogleMaps, $wgHooks, $wgScriptPath, $wgSpecialPages, |
69 | 47 | $wgTitle; |
70 | 48 | // set up some default values for the various extension configuration parameters |
71 | 49 | // to keep from getting PHP notices if running in strict mode |
— | — | @@ -118,11 +96,7 @@ |
119 | 97 | |
120 | 98 | // add the google mime types |
121 | 99 | $magic = null; |
122 | | - if( version_compare( $wgVersion, "1.8" ) >= 0 ) { |
123 | | - $magic = MimeMagic::singleton( ); |
124 | | - } else { |
125 | | - $magic = wfGetMimeMagic( ); |
126 | | - } |
| 100 | + $magic = MimeMagic::singleton( ); |
127 | 101 | $magic->mExtToMime['kml'] = 'application/vnd.google-earth.kml+xml'; |
128 | 102 | $magic->mExtToMime['kmz'] = 'application/vnd.google-earth.kmz'; |
129 | 103 | |
— | — | @@ -142,16 +116,13 @@ |
143 | 117 | $wgTitle ); |
144 | 118 | |
145 | 119 | // This hook will add the interactive editing map to the article edit page. |
146 | | - // This hook was introduced in MW 1.6 |
147 | 120 | $editHook = array( $wgGoogleMaps, 'editForm' ); |
148 | | - if( version_compare( $wgVersion, "1.6" ) >= 0 ) { |
149 | | - if( !$wgGoogleMapsDisableEditorsMap ) { |
150 | | - if( isset( $wgHooks['EditPage::showEditForm:initial'] ) |
151 | | - && is_array( $wgHooks['EditPage::showEditForm:initial'] ) ) { |
152 | | - array_unshift( $wgHooks['EditPage::showEditForm:initial'], $editHook ); |
153 | | - } else { |
154 | | - $wgHooks['EditPage::showEditForm:initial'] = array( $editHook ); |
155 | | - } |
| 121 | + if( !$wgGoogleMapsDisableEditorsMap ) { |
| 122 | + if( isset( $wgHooks['EditPage::showEditForm:initial'] ) |
| 123 | + && is_array( $wgHooks['EditPage::showEditForm:initial'] ) ) { |
| 124 | + array_unshift( $wgHooks['EditPage::showEditForm:initial'], $editHook ); |
| 125 | + } else { |
| 126 | + $wgHooks['EditPage::showEditForm:initial'] = array( $editHook ); |
156 | 127 | } |
157 | 128 | } |
158 | 129 | |
— | — | @@ -167,13 +138,8 @@ |
168 | 139 | // This hook will be called any time the parser encounters a <googlemap> |
169 | 140 | // tag in an article. This will render the actual Google map code in |
170 | 141 | // the article. |
171 | | - if( version_compare( $wgVersion, "1.6" ) >= 0 ) { |
172 | | - $wgParser->setHook( 'googlemap', array( $wgGoogleMaps, 'render16' ) ); |
173 | | - $wgParser->setHook( 'googlemapkml', array( $wgGoogleMaps, 'renderKmlLink' ) ); |
174 | | - } else { |
175 | | - $wgParser->setHook( 'googlemap', 'wfGoogleMaps_Render15' ); |
176 | | - $wgParser->setHook( 'googlemapkml', 'wfGoogleMaps_RenderKmlLink15' ); |
177 | | - } |
| 142 | + $wgParser->setHook( 'googlemap', array( $wgGoogleMaps, 'render16' ) ); |
| 143 | + $wgParser->setHook( 'googlemapkml', array( $wgGoogleMaps, 'renderKmlLink' ) ); |
178 | 144 | |
179 | 145 | // Set up the special page |
180 | 146 | $wgSpecialPages['GoogleMapsKML'] = array('GoogleMapsKML', 'GoogleMapsKML'); |
Index: trunk/extensions/EmbedVideo/EmbedVideo.php |
— | — | @@ -33,13 +33,5 @@ |
34 | 34 | $wgExtensionMessagesFiles['embedvideo'] = $dir . 'EmbedVideo.i18n.php'; |
35 | 35 | |
36 | 36 | $wgHooks['ParserFirstCallInit'][] = "EmbedVideo::setup"; |
37 | | -if ( version_compare( $wgVersion, '1.7', '<' ) ) { |
38 | | - # Hack solution to resolve 1.6 array parameter nullification for hook args |
39 | | - function wfEmbedVideoLanguageGetMagic( &$magicWords ) { |
40 | | - EmbedVideo::parserFunctionMagic( $magicWords ); |
41 | | - return true; |
42 | | - } |
43 | | - $wgHooks['LanguageGetMagic'][] = 'wfEmbedVideoLanguageGetMagic'; |
44 | | -} else { |
45 | | - $wgHooks['LanguageGetMagic'][] = 'EmbedVideo::parserFunctionMagic'; |
46 | | -} |
| 37 | +$wgHooks['LanguageGetMagic'][] = 'EmbedVideo::parserFunctionMagic'; |
| 38 | + |
Index: trunk/extensions/EmbedVideo/EmbedVideo.hooks.php |
— | — | @@ -15,9 +15,7 @@ |
16 | 16 | public static function setup() { |
17 | 17 | # Setup parser hooks. ev is the primary hook, evp is supported for |
18 | 18 | # legacy purposes |
19 | | - global $wgVersion; |
20 | | - |
21 | | - $prefix = version_compare( $wgVersion, '1.7', '<' ) ? '#' : ''; |
| 19 | + $prefix = ''; |
22 | 20 | EmbedVideo::addMagicWord( $prefix, "ev", "EmbedVideo::parserFunction_ev" ); |
23 | 21 | EmbedVideo::addMagicWord( $prefix, "evp", "EmbedVideo::parserFunction_evp" ); |
24 | 22 | |
Index: trunk/extensions/CountEdits/CountEdits.page.php |
— | — | @@ -62,11 +62,9 @@ |
63 | 63 | } |
64 | 64 | |
65 | 65 | function countEditsReal( $id, $text = false ) { |
66 | | - global $wgVersion; |
67 | 66 | $dbr = wfGetDB( DB_SLAVE ); |
68 | | - # MediaWiki 1.9.x has a user.user_editcount column we can use, |
69 | | - # but this is not useful for older versions or anon. checks |
70 | | - if( $text === false && version_compare( $wgVersion, '1.9alpha', '>=' ) ) { |
| 67 | + |
| 68 | + if( $text === false ) { |
71 | 69 | $conds = array( 'user_id' => $id ); |
72 | 70 | return $dbr->selectField( 'user', 'user_editcount', $conds, 'CountEdits::countEditsReal' ); |
73 | 71 | } else { |
Index: trunk/extensions/ContactPageFundraiser/SpecialContact.php |
— | — | @@ -325,11 +325,7 @@ |
326 | 326 | |
327 | 327 | wfDebug( "$fname: sending mail from ".$from->toString()." to ".$to->toString()." replyto ".($replyto==null?'-/-':$replyto->toString())."\n" ); |
328 | 328 | |
329 | | - #HACK: in MW 1.9, replyto must be a string, in MW 1.10 it must be an object! |
330 | | - $ver = preg_replace( '![^\d._+]!', '', $GLOBALS['wgVersion'] ); |
331 | | - $replyaddr = $replyto == null |
332 | | - ? null : version_compare( $ver, '1.10', '<' ) |
333 | | - ? $replyto->toString() : $replyto; |
| 329 | + $replyaddr = $replyto == null ? null : $replyto; |
334 | 330 | |
335 | 331 | $mailResult = userMailer( $to, $from, $subject, $this->text, $replyaddr ); |
336 | 332 | |
Index: trunk/extensions/StalePages/StalePages_body.php |
— | — | @@ -24,9 +24,7 @@ |
25 | 25 | } |
26 | 26 | |
27 | 27 | function execute( $parameters ) { |
28 | | - global $wgVersion; |
29 | | - if( version_compare( $wgVersion, '1.11', '>=' ) ) |
30 | | - wfLoadExtensionMessages( 'Stalepages' ); |
| 28 | + wfLoadExtensionMessages( 'Stalepages' ); |
31 | 29 | |
32 | 30 | $this->setHeaders(); |
33 | 31 | list( $limit, $offset ) = wfCheckLimits(); |
Index: trunk/extensions/LabeledSectionTransclusion/lst.php |
— | — | @@ -137,13 +137,6 @@ |
138 | 138 | $text = str_replace('</section>', '', $text); |
139 | 139 | |
140 | 140 | if (self::open_($parser, $part1)) { |
141 | | - //Handle recursion here, so we can break cycles. |
142 | | - global $wgVersion; |
143 | | - if( version_compare( $wgVersion, "1.9" ) < 0 ) { |
144 | | - $text = $parser->replaceVariables($text); |
145 | | - self::close_($parser, $part1); |
146 | | - } |
147 | | - |
148 | 141 | //Try to get edit sections correct by munging around the parser's guts. |
149 | 142 | return array($text, 'title'=>$title, 'replaceHeadings'=>true, |
150 | 143 | 'headingOffset'=>$skiphead, 'noparse'=>false, 'noargs'=>false); |
Index: trunk/extensions/Contributors/Contributors.page.php |
— | — | @@ -178,10 +178,8 @@ |
179 | 179 | * @return array |
180 | 180 | */ |
181 | 181 | protected static function getConditions($title) { |
182 | | - global $wgVersion; |
183 | 182 | $conds['rev_page'] = $title->getArticleId(); |
184 | | - if( version_compare( $wgVersion, '1.11alpha', '>=' ) ) |
185 | | - $conds[] = 'rev_deleted & ' . Revision::DELETED_USER . ' = 0'; |
| 183 | + $conds[] = 'rev_deleted & ' . Revision::DELETED_USER . ' = 0'; |
186 | 184 | return $conds; |
187 | 185 | } |
188 | 186 | |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -433,30 +433,9 @@ |
434 | 434 | * Function based on version in ContributionScores extension |
435 | 435 | */ |
436 | 436 | function mvfInitMessages() { |
437 | | - global $wgVersion, $wgExtensionFunctions; |
438 | | - if ( version_compare( $wgVersion, '1.11', '>=' ) ) { |
439 | | - wfLoadExtensionMessages( 'MetavidWiki' ); |
440 | | - } else { |
441 | | - $wgExtensionFunctions[] = 'sffLoadMessagesManually'; |
442 | | - } |
| 437 | + wfLoadExtensionMessages( 'MetavidWiki' ); |
443 | 438 | } |
444 | 439 | |
445 | | -/** |
446 | | - * Setting of message cache for versions of MediaWiki that do not support |
447 | | - * wgExtensionFunctions - based on ceContributionScores() in |
448 | | - * ContributionScores extension |
449 | | - */ |
450 | | -function sffLoadMessagesManually() { |
451 | | - global $mvgIP, $wgMessageCache; |
452 | | - |
453 | | - # add messages |
454 | | - require( $mvgIP . '/languages/MV_Messages.php' ); |
455 | | - global $messages; |
456 | | - foreach ( $messages as $key => $value ) { |
457 | | - $wgMessageCache->addMessages( $messages[$key], $key ); |
458 | | - } |
459 | | -} |
460 | | - |
461 | 440 | /* |
462 | 441 | * Utility functions: |
463 | 442 | */ |
Index: trunk/extensions/DynamicPageList/DynamicPageListInclude.php |
— | — | @@ -135,8 +135,6 @@ |
136 | 136 | $recursionCheck = true, $maxLength = - 1, $link = '', |
137 | 137 | $trim = false, $skipPattern = array() |
138 | 138 | ) { |
139 | | - global $wgVersion; |
140 | | - |
141 | 139 | // if someone tries something like<section begin=blah>lst only</section> |
142 | 140 | // text, may as well do the right thing. |
143 | 141 | $text = str_replace( '</section>', '', $text ); |
— | — | @@ -147,10 +145,8 @@ |
148 | 146 | } |
149 | 147 | |
150 | 148 | if ( self::open( $parser, $part1 ) ) { |
151 | | - // Handle recursion here, so we can break cycles. Although we can't do |
152 | | - // feature detection here, r18473 was only a few weeks before the |
153 | | - // release, so this is close enough. |
154 | | - if ( version_compare( $wgVersion, '1.9' ) < 0 || $recursionCheck == false ) { |
| 149 | + // Handle recursion here, so we can break cycles. |
| 150 | + if ( $recursionCheck == false ) { |
155 | 151 | $text = $parser->preprocess( $text, $parser->mTitle, $parser->mOptions ); |
156 | 152 | self::close( $parser, $part1 ); |
157 | 153 | } |