r88947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88946‎ | r88947 | r88948 >
Date:23:19, 26 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
correct handling of offset param
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php
@@ -609,6 +609,10 @@
610610 $params['limit']->setDescription( wfMsg( 'smw_paramdesc_limit' ) );
611611 $params['limit']->setDefault( 20 );
612612
 613+ $params['offset'] = new Parameter( 'offset', Parameter::TYPE_INTEGER );
 614+ $params['offset']->setDescription( wfMsg( 'smw_paramdesc_offset' ) );
 615+ $params['offset']->setDefault( 0 );
 616+
613617 $params['headers'] = new Parameter( 'headers' );
614618 $params['headers']->setDescription( wfMsg( 'smw_paramdesc_headers' ) );
615619 $params['headers']->addCriteria( new CriterionInArray( 'show', 'hide', 'plain' ) );
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
@@ -67,6 +67,7 @@
6868
6969 // Messages for query parameter descriptions
7070 'smw_paramdesc_limit' => 'The maximum number of results to return',
 71+ 'smw_paramdesc_offset' => 'The offset of the first result',
7172 'smw_paramdesc_headers' => 'Display the headers/property names',
7273 'smw_paramdesc_mainlabel' => 'The label to give to the main page name',
7374 'smw_paramdesc_link' => 'Show values as links',

Status & tagging log