r79650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79649‎ | r79650 | r79651 >
Date:16:30, 5 January 2011
Author:philip
Status:ok
Tags:
Comment:
follow r79649, move the in-block assignment outside.
Modified paths:
  • /trunk/phase3/includes/api/ApiOpenSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiOpenSearch.php
@@ -63,7 +63,8 @@
6464 $namespaces );
6565
6666 // if the content language has variants, try to retrieve fallback results
67 - if ( ( $fblimit = $limit - count( $srchres ) ) > 0 ) {
 67+ $fblimit = $limit - count( $srchres );
 68+ if ( $fblimit > 0 ) {
6869 global $wgContLang;
6970 $fbsearchs = $wgContLang->autoConvertToAllVariants( $search );
7071 $fbsearchs = array_diff( array_unique( $fbsearchs ), ( array ) $search );
@@ -71,7 +72,8 @@
7273 $_srchres = PrefixSearch::titleSearch( $fbsearch, $fblimit,
7374 $namespaces );
7475 $srchres = array_merge( $srchres, $_srchres );
75 - if ( ( $fblimit -= - count( $_srchres ) ) == 0 ) {
 76+ $fblimit -= - count( $_srchres );
 77+ if ( $fblimit == 0 ) {
7678 break;
7779 }
7880 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r79651Follow r79649 and r79650. Errrr, remove the redundant minusphilip16:37, 5 January 2011
r797201.17: MFT r79578, r79591, r79593, r79595, r79649, r79650, r79651, r79653, r79...catrope14:48, 6 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79649Add fallback languages support for ApiOpenSearch.philip16:21, 5 January 2011

Status & tagging log