r78617 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78616‎ | r78617 | r78618 >
Date:04:05, 20 December 2010
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Followup r78590, apparently the code that puts unknown categories of extensions into 'other' was not implemented until MediaWiki 1.17... *sigh* So we need to include a version check on these extensions until they stop supporting pre-1.17 versions of MediaWiki.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.php (modified) (history)
  • /trunk/extensions/AntiBot/AntiBot.php (modified) (history)
  • /trunk/extensions/AntiSpoof/AntiSpoof.php (modified) (history)
  • /trunk/extensions/SimpleAntiSpam/SimpleAntiSpam.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist.php (modified) (history)
  • /trunk/extensions/SpamDiffTool/SpamDiffTool.php (modified) (history)
  • /trunk/extensions/TitleBlacklist/TitleBlacklist.php (modified) (history)
  • /trunk/extensions/TorBlock/TorBlock.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AntiSpoof/AntiSpoof.php
@@ -3,7 +3,7 @@
44 exit( 1 );
55 }
66
7 -$wgExtensionCredits['antispam'][] = array(
 7+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
88 'path' => __FILE__,
99 'name' => 'AntiSpoof',
1010 'url' => 'http://www.mediawiki.org/wiki/Extension:AntiSpoof',
Index: trunk/extensions/TorBlock/TorBlock.php
@@ -17,7 +17,7 @@
1818 */
1919
2020 $dir = dirname(__FILE__);
21 -$wgExtensionCredits['antispam'][] = array(
 21+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
2222 'path' => __FILE__,
2323 'name' => 'TorBlock',
2424 'author' => 'Andrew Garrett',
Index: trunk/extensions/SpamDiffTool/SpamDiffTool.php
@@ -15,7 +15,7 @@
1616 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1717 */
1818
19 -$wgExtensionCredits['antispam'][] = array(
 19+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
2020 'path' => __FILE__,
2121 'name' => 'SpamDiffTool',
2222 'author' => 'Travis Derouin',
Index: trunk/extensions/SpamBlacklist/SpamBlacklist.php
@@ -7,7 +7,7 @@
88 exit;
99 }
1010
11 -$wgExtensionCredits['antispam'][] = array(
 11+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
1212 'path' => __FILE__,
1313 'name' => 'SpamBlacklist',
1414 'author' => 'Tim Starling',
Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php
@@ -9,7 +9,7 @@
1010 * @ingroup Extensions
1111 */
1212
13 -$wgExtensionCredits['antispam'][] = array(
 13+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
1414 'path' => __FILE__,
1515 'name' => 'Title Blacklist',
1616 'author' => array( 'Victor Vasiliev', 'Fran Rogers' ),
Index: trunk/extensions/AbuseFilter/AbuseFilter.php
@@ -15,7 +15,7 @@
1616 * @link http://www.mediawiki.org/wiki/Extension:AbuseFilter Documentation
1717 */
1818
19 -$wgExtensionCredits['antispam'][] = array(
 19+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
2020 'path' => __FILE__,
2121 'name' => 'Abuse Filter',
2222 'author' => array( 'Andrew Garrett', 'River Tarnell', 'Victor Vasiliev' ),
Index: trunk/extensions/SimpleAntiSpam/SimpleAntiSpam.php
@@ -10,7 +10,7 @@
1111 die(1);
1212 }
1313
14 -$wgExtensionCredits['antispam'][] = array(
 14+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
1515 'path' => __FILE__,
1616 'name' => 'SimpleAntiSpam',
1717 'descriptionmsg' => 'simpleantispam-desc',
Index: trunk/extensions/AntiBot/AntiBot.php
@@ -34,7 +34,7 @@
3535
3636 /** END CONFIGURATION */
3737
38 -$wgExtensionCredits['antispam'][] = array(
 38+$wgExtensionCredits[version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'][] = array(
3939 'path' => __FILE__,
4040 'name' => 'AntiBot',
4141 'url' => 'http://www.mediawiki.org/wiki/Extension:AntiBot',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78590Change extension group 'other' for some of our antispam extensions into the n...dantman01:59, 19 December 2010

Comments

#Comment by 😂 (talk | contribs)   22:45, 30 December 2010

I'm going to point to this from now on when people ask for an example of ugly back-compatibility.

Status & tagging log