Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | protected function handleParameters( array $params, $outputmode ) { |
39 | 39 | parent::handleParameters( $params, $outputmode ); |
40 | 40 | |
41 | | - $this->mSep = $this->isPlainlist() ? $params['sep'] : ''; |
| 41 | + $this->mSep = $params['sep']; |
42 | 42 | $this->mTemplate = trim( $params['template'] ); |
43 | 43 | $this->mNamedArgs = $params['named args']; |
44 | 44 | $this->mUserParam = trim( $params['userparam'] ); |
— | — | @@ -63,8 +63,6 @@ |
64 | 64 | $rowstart = "\t<li>"; |
65 | 65 | $rowend = "</li>\n"; |
66 | 66 | $plainlist = false; |
67 | | - $finallistsep = ''; |
68 | | - $listsep = ''; |
69 | 67 | } else { // "list" and "template" format |
70 | 68 | $header = ''; |
71 | 69 | $footer = ''; |
— | — | @@ -72,18 +70,24 @@ |
73 | 71 | $rowend = ''; |
74 | 72 | $plainlist = true; |
75 | 73 | |
76 | | - if ( $this->mSep !== '' ) { // always respect custom separator |
77 | | - $listsep = $this->mSep; |
78 | | - $finallistsep = $listsep; |
79 | | - } elseif ( $this->mFormat == 'list' ) { // make default list ", , , and " |
80 | | - $listsep = ', '; |
81 | | - $finallistsep = wfMsgForContent( 'smw_finallistconjunct' ) . ' '; |
82 | | - } else { // no default separators for format "template" |
83 | | - $listsep = ''; |
84 | | - $finallistsep = ''; |
85 | | - } |
86 | 74 | } |
87 | 75 | |
| 76 | + if ( $this->mSep !== '' ) { // always respect custom separator |
| 77 | + $listsep = $this->mSep; |
| 78 | + $finallistsep = $listsep; |
| 79 | + } elseif ( $this->mFormat == 'list' ) { // make default list ", , , and " |
| 80 | + // TODO: No default separator for "ul" and "ol" to not break |
| 81 | + // compatibility with SMW pre 1.7.1. But they really should have |
| 82 | + // default separators, i.e. the check should be for |
| 83 | + // $this->mFormat !== 'template' |
| 84 | + |
| 85 | + $listsep = ', '; |
| 86 | + $finallistsep = wfMsgForContent( 'smw_finallistconjunct' ) . ' '; |
| 87 | + } else { // no default separators for format "template", "ul", "ol" |
| 88 | + $listsep = ''; |
| 89 | + $finallistsep = ''; |
| 90 | + } |
| 91 | + |
88 | 92 | // Initialise more values |
89 | 93 | $result = ''; |
90 | 94 | $column_width = 0; |
— | — | @@ -285,12 +289,10 @@ |
286 | 290 | public function getParameters() { |
287 | 291 | $params = array_merge( parent::getParameters(), parent::textDisplayParameters() ); |
288 | 292 | |
289 | | - if ( $this->isPlainlist() ) { |
290 | | - $params['sep'] = new Parameter( 'sep' ); |
291 | | - $params['sep']->setMessage( 'smw_paramdesc_sep' ); |
292 | | - $params['sep']->setDefault( '' ); |
293 | | - } |
294 | | - |
| 293 | + $params['sep'] = new Parameter( 'sep' ); |
| 294 | + $params['sep']->setMessage( 'smw_paramdesc_sep' ); |
| 295 | + $params['sep']->setDefault( '' ); |
| 296 | + |
295 | 297 | $params['template'] = new Parameter( 'template' ); |
296 | 298 | $params['template']->setMessage( 'smw_paramdesc_template' ); |
297 | 299 | $params['template']->setDefault( '' ); |