Yaron Koren has submitted this change and it was merged.

Change subject: Fixed handling for "limit=0" - fix for 7e2b99a
......................................................................


Fixed handling for "limit=0" - fix for 7e2b99a

Change-Id: I2ef11129cdbe468d441d9819bfe5a43da3deab6f
---
M parserfunctions/CargoQuery.php
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/parserfunctions/CargoQuery.php b/parserfunctions/CargoQuery.php
index c286673..110a561 100644
--- a/parserfunctions/CargoQuery.php
+++ b/parserfunctions/CargoQuery.php
@@ -102,9 +102,10 @@
 
                // Finally, do the display.
                $text = $queryDisplayer->displayQueryResults( $formatter, 
$queryResults );
-               // If there are no results, it's just an automatic message so
-               // there's no need for special parsing.
-               if ( count( $queryResults ) == 0 ) {
+               // If there are no results, and the limit was not set to 0,
+               // it's just an automatic message so there's no need for
+               // special parsing.
+               if ( count( $queryResults ) == 0 && $sqlQuery->mQueryLimit > 0 
) {
                        return $text;
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/190818
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ef11129cdbe468d441d9819bfe5a43da3deab6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to