http://www.mediawiki.org/wiki/Special:Code/MediaWiki/79650

Revision: 79650
Author:   philip
Date:     2011-01-05 16:30:10 +0000 (Wed, 05 Jan 2011)
Log Message:
-----------
follow r79649, move the in-block assignment outside.

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiOpenSearch.php

Modified: trunk/phase3/includes/api/ApiOpenSearch.php
===================================================================
--- trunk/phase3/includes/api/ApiOpenSearch.php 2011-01-05 16:21:01 UTC (rev 
79649)
+++ trunk/phase3/includes/api/ApiOpenSearch.php 2011-01-05 16:30:10 UTC (rev 
79650)
@@ -63,7 +63,8 @@
                                $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 @@
                                        $_srchres = PrefixSearch::titleSearch( 
$fbsearch, $fblimit,
                                                $namespaces );
                                        $srchres = array_merge( $srchres, 
$_srchres );
-                                       if ( ( $fblimit -= - count( $_srchres ) 
) == 0 ) {
+                                       $fblimit -= - count( $_srchres );
+                                       if ( $fblimit == 0 ) {
                                                break;
                                        }
                                }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to