Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | $url = $title->getFullURL(); |
187 | 187 | |
188 | 188 | $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"; |
190 | 190 | $result .= "URL:$url\r\n"; |
191 | 191 | $result .= "UID:$url\r\n"; |
192 | 192 | |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | */ |
209 | 209 | static private function parsedate( SMWTimeValue $dv, $isend = false ) { |
210 | 210 | $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 |
212 | 212 | |
213 | 213 | $year = number_format( $year, 0, '.', '' ); |
214 | 214 | $time = str_replace( ':', '', $dv->getTimeString( false ) ); |
— | — | @@ -240,6 +240,10 @@ |
241 | 241 | $params['description']->setMessage( 'srf_paramdesc_icalendardescription' ); |
242 | 242 | $params['description']->setDefault( '' ); |
243 | 243 | |
| 244 | + $params['summary'] = new Parameter( 'summary' ); |
| 245 | + $params['summary']->setMessage( 'srf-paramdesc-ical-summary' ); |
| 246 | + $params['summary']->setDefault( '$1' ); |
| 247 | + |
244 | 248 | return $params; |
245 | 249 | } |
246 | 250 | |
Index: trunk/extensions/SemanticResultFormats/SRF_Messages.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'srf_printername_icalendar' => 'iCalendar export', |
35 | 35 | 'srf_paramdesc_icalendartitle' => 'The title of the calendar file', |
36 | 36 | '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.', |
37 | 38 | // format "BibTeX" |
38 | 39 | 'srf_bibtex_link' => 'BibTeX', |
39 | 40 | 'srf_printername_bibtex' => 'BibTeX export', |