Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php |
— | — | @@ -160,11 +160,9 @@ |
161 | 161 | if ( $found || $parts[0] == $primary ) { |
162 | 162 | # Found a match, return now |
163 | 163 | return $parts[1]; |
164 | | - } else { |
165 | | - if ( $mwDefault->matchStartAndRemove( $parts[0] ) ) { |
166 | | - $default = $parts[1]; |
167 | | - } # else wrong case, continue |
168 | | - } |
| 164 | + } elseif ( $mwDefault->matchStartAndRemove( $parts[0] ) ) { |
| 165 | + $default = $parts[1]; |
| 166 | + } # else wrong case, continue |
169 | 167 | } elseif ( count( $parts ) == 1 ) { |
170 | 168 | # Multiple input, single output |
171 | 169 | # If the value matches, set a flag and continue |
— | — | @@ -211,11 +209,9 @@ |
212 | 210 | if ( $test == $primary ) { |
213 | 211 | # Found a match, return now |
214 | 212 | return trim( $frame->expand( $valueNode ) ); |
215 | | - } else { |
216 | | - if ( $mwDefault->matchStartAndRemove( $test ) ) { |
217 | | - $default = $valueNode; |
218 | | - } # else wrong case, continue |
219 | | - } |
| 213 | + } elseif ( $mwDefault->matchStartAndRemove( $test ) ) { |
| 214 | + $default = $valueNode; |
| 215 | + } # else wrong case, continue |
220 | 216 | } |
221 | 217 | } else { |
222 | 218 | # Multiple input, single output |