r57756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57755‎ | r57756 | r57757 >
Date:09:28, 15 October 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
avoid printing namespace prefix for ?Category printouts
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php
@@ -25,7 +25,7 @@
2626 $printrequestparameters = array();
2727 foreach ($res->getPrintRequests() as $pr)
2828 $printrequestparameters[] = $pr->getParams();
29 -
 29+
3030 // print header
3131 $result = '<table class="smwtable"' .
3232 ('broadtable' == $this->mFormat?' width="100%"':'') .
@@ -45,12 +45,12 @@
4646 $fieldcount = -1;
4747 foreach ($row as $field) {
4848 $fieldcount = $fieldcount + 1;
49 -
 49+
5050 $result .= "\t\t<td";
5151 if (array_key_exists('align', $printrequestparameters[$fieldcount])) {
5252 $alignment = $printrequestparameters[$fieldcount]['align'];
5353 // check the content, otherwise evil people could inject here anything they wanted
54 - if (($alignment == 'right') || ($alignment == 'left'))
 54+ if (($alignment == 'right') || ($alignment == 'left'))
5555 $result .= " style=\"text-align:" . $printrequestparameters[$fieldcount]['align'] . ";\"";
5656 }
5757 $result .= ">";
@@ -66,7 +66,7 @@
6767 $result .= '<br />';
6868 }
6969 // use shorter "LongText" for wikipage
70 - $result .= ($object->getTypeID() == '_wpg')?
 70+ $result .= ( ($object->getTypeID() == '_wpg')||($object->getTypeID() == '__sin') )?
7171 $object->getLongText($outputmode,$this->getLinker($firstcol)):
7272 $object->getShortText($outputmode,$this->getLinker($firstcol));
7373 }
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php
@@ -233,7 +233,7 @@
234234 public function getNextText($outputmode, $linker = NULL) {
235235 $object = $this->getNextObject();
236236 if ($object instanceof SMWDataValue) { //print data values
237 - return ($object->getTypeID() == '_wpg')? // prefer "long" text for page-values
 237+ return ( ($object->getTypeID() == '_wpg')||($object->getTypeID() == '__sin') )? // prefer "long" text for page-values
238238 $object->getLongText($outputmode, $linker):
239239 $object->getShortText($outputmode, $linker);
240240 } else {

Status & tagging log