r58479 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58478‎ | r58479 | r58480 >
Date:14:19, 3 November 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
preserve format when displaying further results (Bug 20619)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Category.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Category.php
@@ -16,7 +16,6 @@
1717 */
1818 class SMWCategoryResultPrinter extends SMWResultPrinter {
1919
20 - protected $mSep = '';
2120 protected $mDelim = ',';
2221 protected $mTemplate = '';
2322 protected $mUserParam = '';
@@ -25,9 +24,6 @@
2625 protected function readParameters($params,$outputmode) {
2726 SMWResultPrinter::readParameters($params,$outputmode);
2827
29 - if (array_key_exists('sep', $params)) {
30 - $this->mSep = str_replace('_',' ',$params['sep']);
31 - }
3228 if (array_key_exists('delim', $params)) {
3329 $this->mDelim = str_replace('_',' ',$params['delim']);
3430 }
@@ -113,7 +109,7 @@
114110 $result .= ' (';
115111 $found_values = true;
116112 } elseif ($found_values || !$first_value) {
117 - // any value after '(' or non-first values on first column
 113+ // any value after '(' or non-first values on first column
118114 $result .= ', ';
119115 }
120116 if ($first_value) { // first value in any column, print header
@@ -145,9 +141,8 @@
146142 if ($this->getSearchLabel(SMW_OUTPUT_WIKI)) {
147143 $link->setCaption($this->getSearchLabel(SMW_OUTPUT_WIKI));
148144 }
149 - /// NOTE: passing the parameter sep is not needed, since we use format=ul
150 -
151 - $link->setParameter('ul','format'); // always use ul, other formats hardly work as search page output
 145+ $link->setParameter('category','format');
 146+ if ($this->mNumColumns != 3) $link->setParameter($this->mNumColumns,'columns');
152147 if ($this->mTemplate != '') {
153148 $link->setParameter($this->mTemplate,'template');
154149 if (array_key_exists('link', $this->m_params)) { // linking may interfere with templates

Status & tagging log