r45740 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45739‎ | r45740 | r45741 >
Date:18:30, 14 January 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
Make sure that the limit for results in a single inline query is always used for queries on this special page, too
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -52,7 +52,7 @@
5353 // This code rather hacky since there are many ways to call that special page, the most involved of
5454 // which is the way that this page calls itself when data is submitted via the form (since the shape
5555 // of the parameters then is governed by the UI structure, as opposed to being governed by reason).
56 - global $wgRequest;
 56+ global $wgRequest, $smwgQMaxInlineLimit;
5757
5858 // First make all inputs into a simple parameter list that can again be parsed into components later.
5959
@@ -132,6 +132,7 @@
133133 $this->m_params['limit'] = ($this->m_params['format'] == 'rss')?10:20; // standard limit for RSS
134134 }
135135 }
 136+ $this->m_params['limit'] = min($this->m_params['limit'], $smwgQMaxInlineLimit);
136137
137138 $this->m_editquery = ( $wgRequest->getVal( 'eq' ) != '' ) || ('' == $this->m_querystring );
138139 }

Status & tagging log