Page MenuHomePhabricator

limit>0 query fail to produce proper links.
Closed, ResolvedPublic

Description

Author: jwm

Description:
Limit>0 link fix.

Setting the limit parameter less than zero should produce only a “further results” link to a similar query via Special:Ask, however there are two problems:

  1. The resulting link is missing most of the parameters of the original inline query.
  1. Several result formats in the SemanticResultFormat extension override the getResult method from SMWResultPrinter in order to still print output even if there are no results, however they do so at the expense of the negative limit link feature, as well as a collection of other error handling code.

The attached patch fixes both problems:

  1. All parameters are added to the link. The limit is flipped to positive.
  1. An additional argument is added to getResult for printing zero result queries which defaults to false. Result formats that want to print zero result output can override the method by calling the parent method with printnoresults=True.

Version: unspecified
Severity: normal

Attached:

Details

Reference
bz27885

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:35 PM
bzimport set Reference to bz27885.

jwm wrote:

*** Bug 27638 has been marked as a duplicate of this bug. ***

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

Adding "need-review" keyword to indicate patch awaits review.

I agree w/ the reasoning here, and in fact wanted to make such changes myself at some point. Patch probably needs some modifications to work properly w/ 1.7 and later though.

Will look at this after 1.7 rel when I find the time.

This should definitely be fixed in 1.8 If ay part of the problem is still there, please reopen.