From 6fe99a3e4c316a58d1919f340d12668e38c654ea Mon Sep 17 00:00:00 2001 From: Philip Tzou Date: Wed, 5 Jan 2011 16:30:10 +0000 Subject: [PATCH] follow r79649, move the in-block assignment outside. --- includes/api/ApiOpenSearch.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php index 8b382a41a9..de919b4369 100644 --- a/includes/api/ApiOpenSearch.php +++ b/includes/api/ApiOpenSearch.php @@ -63,7 +63,8 @@ class ApiOpenSearch extends ApiBase { $namespaces ); // if the content language has variants, try to retrieve fallback results - if ( ( $fblimit = $limit - count( $srchres ) ) > 0 ) { + $fblimit = $limit - count( $srchres ); + if ( $fblimit > 0 ) { global $wgContLang; $fbsearchs = $wgContLang->autoConvertToAllVariants( $search ); $fbsearchs = array_diff( array_unique( $fbsearchs ), ( array ) $search ); @@ -71,7 +72,8 @@ class ApiOpenSearch extends ApiBase { $_srchres = PrefixSearch::titleSearch( $fbsearch, $fblimit, $namespaces ); $srchres = array_merge( $srchres, $_srchres ); - if ( ( $fblimit -= - count( $_srchres ) ) == 0 ) { + $fblimit -= - count( $_srchres ); + if ( $fblimit == 0 ) { break; } } -- 2.20.1