r85777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85776‎ | r85777 | r85778 >
Date:01:36, 11 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added validator style params to ical format
Modified paths:
  • /trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php
@@ -241,8 +241,17 @@
242242 public function getParameters() {
243243 $params = parent::exportFormatParameters();
244244
245 - $params[] = array( 'name' => 'title', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_icalendartitle' ) );
246 - $params[] = array( 'name' => 'description', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_icalendardescription' ) );
 245+ if ( defined( 'SMW_SUPPORTS_VALIDATOR' ) ) {
 246+ $params['title'] = new Parameter( 'title' );
 247+ $params['title']->setDescription( wfMsg( 'srf_paramdesc_icalendartitle' ) );
 248+
 249+ $params['description'] = new Parameter( 'description' );
 250+ $params['description']->setDescription( wfMsg( 'srf_paramdesc_icalendardescription' ) );
 251+ }
 252+ else {
 253+ $params[] = array( 'name' => 'title', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_icalendartitle' ) );
 254+ $params[] = array( 'name' => 'description', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_icalendardescription' ) );
 255+ }
247256
248257 return $params;
249258 }

Status & tagging log