r101505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101504‎ | r101505 | r101506 >
Date:18:06, 1 November 2011
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SemanticResultFormats/SRF_Messages.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php
@@ -185,7 +185,7 @@
186186 $url = $title->getFullURL();
187187
188188 $result .= "BEGIN:VEVENT\r\n";
189 - $result .= "SUMMARY:" . $wikipage->getShortWikiText() . "\r\n";
 189+ $result .= "SUMMARY:" . str_replace( '$1', $wikipage->getShortWikiText(), $this->params['summary'] ) . "\r\n";
190190 $result .= "URL:$url\r\n";
191191 $result .= "UID:$url\r\n";
192192
@@ -207,7 +207,7 @@
208208 */
209209 static private function parsedate( SMWTimeValue $dv, $isend = false ) {
210210 $year = $dv->getYear();
211 - if ( ( $year > 9999 ) || ( $year < - 9998 ) ) return ''; // ISO range is limited to four digits
 211+ if ( ( $year > 9999 ) || ( $year < -9998 ) ) return ''; // ISO range is limited to four digits
212212
213213 $year = number_format( $year, 0, '.', '' );
214214 $time = str_replace( ':', '', $dv->getTimeString( false ) );
@@ -240,6 +240,10 @@
241241 $params['description']->setMessage( 'srf_paramdesc_icalendardescription' );
242242 $params['description']->setDefault( '' );
243243
 244+ $params['summary'] = new Parameter( 'summary' );
 245+ $params['summary']->setMessage( 'srf-paramdesc-ical-summary' );
 246+ $params['summary']->setDefault( '$1' );
 247+
244248 return $params;
245249 }
246250
Index: trunk/extensions/SemanticResultFormats/SRF_Messages.php
@@ -33,6 +33,7 @@
3434 'srf_printername_icalendar' => 'iCalendar export',
3535 'srf_paramdesc_icalendartitle' => 'The title of the calendar file',
3636 'srf_paramdesc_icalendardescription' => 'The description of the calendar file',
 37+ 'srf-paramdesc-ical-summary' => 'The summary for each calendar entry. $1 gets replaced by the title of the page to shich the entry corresponds.',
3738 // format "BibTeX"
3839 'srf_bibtex_link' => 'BibTeX',
3940 'srf_printername_bibtex' => 'BibTeX export',

Follow-up revisions

RevisionCommit summaryAuthorDate
r101587Follow up to r101505; typojeroendedauw06:25, 2 November 2011

Comments

#Comment by Raymond (talk | contribs)   19:29, 1 November 2011

"... to shich ... "??? Do you mean "which"?

Status & tagging log