r103767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103766‎ | r103767 | r103768 >
Date:18:02, 20 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Braces, spaces, documentation
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -314,8 +314,7 @@
315315 } else {
316316 print( $out );
317317 }
318 - }
319 - else {
 318+ } else {
320319 $out = preg_replace( '/\n\z/', '', $out );
321320 $this->outputChanneled( $out, $channel );
322321 }
Index: trunk/phase3/includes/search/SearchEngine.php
@@ -1203,22 +1203,27 @@
12041204 * @return String
12051205 */
12061206 function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
1207 - if ( $start != 0 )
 1207+ if ( $start != 0 ) {
12081208 $start = $this->position( $text, $start, 1 );
1209 - if ( $end >= strlen( $text ) )
 1209+ }
 1210+ if ( $end >= strlen( $text ) ) {
12101211 $end = strlen( $text );
1211 - else
 1212+ } else {
12121213 $end = $this->position( $text, $end );
 1214+ }
12131215
1214 - if ( !is_null( $posStart ) )
 1216+ if ( !is_null( $posStart ) ) {
12151217 $posStart = $start;
1216 - if ( !is_null( $posEnd ) )
 1218+ }
 1219+ if ( !is_null( $posEnd ) ) {
12171220 $posEnd = $end;
 1221+ }
12181222
1219 - if ( $end > $start )
 1223+ if ( $end > $start ) {
12201224 return substr( $text, $start, $end - $start );
1221 - else
 1225+ } else {
12221226 return '';
 1227+ }
12231228 }
12241229
12251230 /**
Index: trunk/phase3/includes/Title.php
@@ -4278,7 +4278,7 @@
42794279 /**
42804280 * Get a backlink cache object
42814281 *
4282 - * @return object BacklinkCache
 4282+ * @return BacklinkCache
42834283 */
42844284 function getBacklinkCache() {
42854285 if ( is_null( $this->mBacklinkCache ) ) {

Status & tagging log