r76219 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76218‎ | r76219 | r76220 >
Date:22:00, 6 November 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Threw out some redundant checks
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
@@ -9,7 +9,7 @@
1010 * If used, this file replaces SMW_Setup.php. The files are never used together
1111 * since they define some functions of the same name.
1212 *
13 - * SMWLight does not support versions of MediaWiki older than 1.14.0.
 13+ * SMWLight does not support versions of MediaWiki older than 1.15.0.
1414 * @file
1515 * @ingroup SMW
1616 */
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -262,20 +262,11 @@
263263 $wgHooks['ParserFirstCallInit'][] = 'smwfRegisterParserFunctions';
264264
265265 if ( $smwgToolboxBrowseLink ) {
266 - if ( version_compare( $wgVersion, '1.13', '>=' ) ) {
267 - $wgHooks['SkinTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; // introduced only in 1.13
268 - } else {
269 - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'smwfShowBrowseLink';
270 - }
 266+ $wgHooks['SkinTemplateToolboxEnd'][] = 'smwfShowBrowseLink';
271267 }
272268
273 - if ( version_compare( $wgVersion, '1.14alpha', '>=' ) ) {
274 - $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories
275 - $smwgMW_1_14 = true; // assume latest 1.14 API
276 - } else {
277 - $wgHooks['OutputPageBeforeHTML'][] = 'SMWFactbox::onOutputPageBeforeHTML'; // draw Factbox right below page content
278 - $smwgMW_1_14 = false; // assume <= 1.13 API
279 - }
 269+ $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories
 270+ $smwgMW_1_14 = true; // assume latest 1.14 API
280271
281272 // Registration of the extension credits, see Special:Version.
282273 $wgExtensionCredits['semantic'][] = array(

Status & tagging log