r24974 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24973‎ | r24974 | r24975 >
Date:11:49, 21 August 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Support "default" parameter in ask
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinters.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinters.php
@@ -45,6 +45,9 @@
4646 */
4747 public function getResultHTML($results, $params) {
4848 $this->readParameters($params);
 49+ if ($results->getCount() == 0) {
 50+ return htmlspecialchars($this->mDefault);
 51+ }
4952 return $this->getHTML($results);
5053 }
5154
@@ -128,6 +131,8 @@
129132 protected function getHTML($res) {
130133 global $smwgIQRunningNumber;
131134
 135+
 136+
132137 // print header
133138 if ('broadtable' == $this->mFormat)
134139 $widthpara = ' width="100%"';

Status & tagging log