r114146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114145‎ | r114146 | r114147 >
Date:15:25, 19 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Fix switch fall through

Remove code for getting svn rev from SVN less than 1.4 - Ubuntu 8.04 LTS has 1.4.6 so should be pretty safe
Modified paths:
  • /trunk/phase3/maintenance/mwdocgen.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mwdocgen.php
@@ -116,31 +116,7 @@
117117
118118 $content = file( $entries );
119119
120 - // check if file is xml (subversion release <= 1.3) or not (subversion release = 1.4)
121 - if ( preg_match( '/^<\?xml/', $content[0] ) ) {
122 - // subversion is release <= 1.3
123 - if ( !function_exists( 'simplexml_load_file' ) ) {
124 - // We could fall back to expat... YUCK
125 - return false;
126 - }
127 -
128 - $xml = simplexml_load_file( $entries );
129 -
130 - if ( $xml ) {
131 - foreach ( $xml->entry as $entry ) {
132 - if ( $xml->entry[0]['name'] == '' ) {
133 - // The directory entry should always have a revision marker.
134 - if ( $entry['revision'] ) {
135 - return intval( $entry['revision'] );
136 - }
137 - }
138 - }
139 - }
140 - return false;
141 - } else {
142 - // subversion is release 1.4
143 - return intval( $content[3] );
144 - }
 120+ return intval( $content[3] );
145121 }
146122
147123 /**
@@ -273,6 +249,7 @@
274250 $file = readaline( "Enter file name $mwPath" );
275251 }
276252 $input = $mwPath . $file;
 253+ break;
277254 case 6:
278255 $input = $mwPath;
279256 $exclude_patterns = 'extensions';

Status & tagging log