r85214 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85213‎ | r85214 | r85215 >
Date:21:56, 2 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r85213 and r85187
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinter.php
@@ -420,7 +420,7 @@
421421 * @return array
422422 */
423423 protected function textDisplayParameters() {
424 - /*$params = array();
 424+ $params = array();
425425
426426 $params['intro'] = new Parameter( 'intro' );
427427 $params['intro']->setDescription( wfMsg( 'smw_paramdesc_intro' ) );
@@ -431,12 +431,7 @@
432432 $params['default'] = new Parameter( 'default' );
433433 $params['default']->setDescription( wfMsg( 'smw_paramdesc_default' ) );
434434
435 - return $params;*/
436 - return array(
437 - array( 'name' => 'intro', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_intro' ) ),
438 - array( 'name' => 'outro', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_outro' ) ),
439 - array( 'name' => 'default', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_default' ) ),
440 - );
 435+ return $params;
441436 }
442437
443438 /**
@@ -448,20 +443,14 @@
449444 * @return array
450445 */
451446 protected function exportFormatParameters() {
452 - /*$params = $this->getParameters();
 447+ $params = $this->getParameters();
453448
454449 unset( $params['link'] );
455450
456451 $params['searchlabel'] = new Parameter( 'searchlabel' );
457452 $params['searchlabel']->setDescription( wfMsg( 'smw_paramdesc_searchlabel' ) );
458453
459 - return $params; */
460 - return array(
461 - array( 'name' => 'limit', 'type' => 'int', 'description' => wfMsg( 'smw_paramdesc_limit' ) ),
462 - array( 'name' => 'headers', 'type' => 'enumeration', 'description' => wfMsg( 'smw_paramdesc_headers' ), 'values' => array( 'show', 'hide', 'plain' ) ),
463 - array( 'name' => 'mainlabel', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_mainlabel' ) ),
464 - array( 'name' => 'searchlabel', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_searchlabel' ) ),
465 - );
 454+ return $params;
466455 }
467456
468457 /**
@@ -474,7 +463,7 @@
475464 * @return array
476465 */
477466 public function getParameters() {
478 - /*$params = array();
 467+ $params = array();
479468
480469 $params['limit'] = new Parameter( 'limit', Parameter::TYPE_INTEGER );
481470 $params['limit']->setDescription( wfMsg( 'smw_paramdesc_limit' ) );
@@ -490,13 +479,7 @@
491480 $params['link']->setDescription( wfMsg( 'smw_paramdesc_link' ) );
492481 $params['link']->addCriteria( new CriterionInArray( 'all', 'subject', 'none' ) );
493482
494 - return $params;*/
495 - return array(
496 - array( 'name' => 'limit', 'type' => 'int', 'description' => wfMsg( 'smw_paramdesc_limit' ) ),
497 - array( 'name' => 'headers', 'type' => 'enumeration', 'description' => wfMsg( 'smw_paramdesc_headers' ), 'values' => array( 'show', 'hide', 'plain' ) ),
498 - array( 'name' => 'mainlabel', 'type' => 'string', 'description' => wfMsg( 'smw_paramdesc_mainlabel' ) ),
499 - array( 'name' => 'link', 'type' => 'enumeration', 'description' => wfMsg( 'smw_paramdesc_link' ), 'values' => array( 'all', 'subject', 'none' ) ),
500 - );
 483+ return $params;
501484 }
502485
503486 }
\ No newline at end of file

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85187adding Validator style param definitionsjeroendedauw12:30, 2 April 2011
r85213some preliminary work on switching the query printers to use validator, the s...jeroendedauw21:51, 2 April 2011

Status & tagging log