Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php |
— | — | @@ -637,6 +637,15 @@ |
638 | 638 | $params['limit']->setMessage( 'smw_paramdesc_limit' ); |
639 | 639 | $params['limit']->setDefault( 20 ); |
640 | 640 | |
| 641 | + $params['sort'] = new ListParameter( 'sort' ); |
| 642 | + $params['sort']->setMessage( 'smw-paramdesc-sort' ); |
| 643 | + $params['sort']->setDefault( '' ); |
| 644 | + |
| 645 | + $params['order'] = new ListParameter( 'order' ); |
| 646 | + $params['order']->setMessage( 'smw-paramdesc-order' ); |
| 647 | + $params['order']->setDefault( '' ); |
| 648 | + $params['order']->addCriteria( new CriterionInArray( 'descending', 'desc', 'asc', 'ascending', 'rand', 'random' ) ); |
| 649 | + |
641 | 650 | $params['offset'] = new Parameter( 'offset', Parameter::TYPE_INTEGER ); |
642 | 651 | $params['offset']->setMessage( 'smw_paramdesc_offset' ); |
643 | 652 | $params['offset']->setDefault( 0 ); |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php |
— | — | @@ -93,6 +93,8 @@ |
94 | 94 | 'smw-paramdesc-dsv-filename' => 'The name for the DSV file', |
95 | 95 | 'smw-smwdoc-description' => 'Shows a table of all parameters that can be used for the specified result format together with default values and descriptions.', |
96 | 96 | 'smw-smwdoc-par-format' => 'The result format to display parameter documentation for.', |
| 97 | + 'smw-paramdesc-sort' => 'Property to sort the query by', |
| 98 | + 'smw-paramdesc-order' => 'Order of the query sort', |
97 | 99 | |
98 | 100 | // Messages and strings for inline queries |
99 | 101 | 'smw_iq_disabled' => "Semantic queries have been disabled for this wiki.", |