r111816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111815‎ | r111816 | r111817 >
Date:07:35, 18 February 2012
Author:wikinaut
Status:reverted
Tags:gerritmigration 
Comment:
follow-up r111350 r111351 . switch replaced by if elseif construct.
Modified paths:
  • /trunk/extensions/RSS/RSS.php (modified) (history)
  • /trunk/extensions/RSS/RSSParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RSS/RSSParser.php
@@ -55,13 +55,10 @@
5656
5757 # Get date format from argument array
5858 # or use a default value
59 - switch ( true ) {
60 - case ( isset( $args['date'] ) ):
 59+ if ( isset( $args['date'] ) ) {
6160 $this->date = $args['date'];
62 - break;
63 - case ( isset( $wgRSSDateDefaultFormat ) ):
 61+ } elseif ( isset( $wgRSSDateDefaultFormat ) ) {
6462 $this->date = $wgRSSDateDefaultFormat;
65 - break;
6663 }
6764
6865 # Get highlight terms from argument array
@@ -76,13 +73,10 @@
7774 }
7875
7976 # Get a maximal length for item texts
80 - switch ( true ) {
81 - case ( isset( $args['item-max-length'] ) ):
 77+ if ( isset( $args['item-max-length'] ) ) {
8278 $this->ItemMaxLength = $args['item-max-length'];
83 - break;
84 - case ( isset( $wgRSSItemMaxLength ) && is_numeric( $wgRSSItemMaxLength ) ):
 79+ } elseif ( isset( $wgRSSItemMaxLength ) && is_numeric( $wgRSSItemMaxLength ) ) {
8580 $this->ItemMaxLength = $wgRSSItemMaxLength;
86 - break;
8781 }
8882
8983 if ( isset( $args['filterout'] ) ) {
Index: trunk/extensions/RSS/RSS.php
@@ -4,7 +4,7 @@
55 *
66 * @file
77 * @ingroup Extensions
8 - * @version 1.90
 8+ * @version 1.93
99 * @author mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, Chris Reigrut, K001
1010 * @author Kellan Elliott-McCrea <kellan@protest.net> -- author of MagpieRSS
1111 * @author Jeroen De Dauw
@@ -26,7 +26,7 @@
2727 'Rdb', 'Mafs', 'Alxndr', 'Thomas Gries', 'Chris Reigrut',
2828 'K001', 'Jack Phoenix', 'Jeroen De Dauw', 'Mark A. Hershberger'
2929 ),
30 - 'version' => '1.92 20120213',
 30+ 'version' => '1.93 20120218',
3131 'url' => 'https://www.mediawiki.org/wiki/Extension:RSS',
3232 'descriptionmsg' => 'rss-desc',
3333 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r114390Revert r111347, r111348, r111350, r111351, r111515, r111816, r112243, r112251......catrope18:40, 21 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111350fix for bug30377 : add a new parameter to limit the number of characters when...wikinaut07:23, 13 February 2012
r111351follow-up r111350 . check if optional parameter isset and is_numeric, otherw...wikinaut07:36, 13 February 2012

Status & tagging log