r40326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40325‎ | r40326 | r40327 >
Date:16:38, 2 September 2008
Author:mkroetzsch
Status:old
Tags:
Comment:
Updated printer code to fit current SMW 1.3a devel version (somewhat simpler now)
Modified paths:
  • /trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GoogleBar.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GoogleBar.php
@@ -19,15 +19,10 @@
2020 }
2121 }
2222
23 - public function getResult($results, $params, $outputmode) {
24 - $result = parent::getResult($results, $params, $outputmode);
25 - $this->readParameters($params,$outputmode);
26 - return array($result, 'isHTML' => true);
27 - }
28 -
2923 protected function getResultText($res, $outputmode) {
3024 global $smwgIQRunningNumber;
31 -
 25+ $this->isHTML = true;
 26+
3227 $t = "";
3328 // print all result rows
3429 $first = true;
Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php
@@ -25,15 +25,10 @@
2626 }
2727 }
2828
29 - public function getResult($results, $params, $outputmode) {
30 - $result = parent::getResult($results, $params, $outputmode);
31 - $this->readParameters($params,$outputmode);
32 - return array($result, 'isHTML' => true);
33 - }
34 -
3529 protected function getResultText($res, $outputmode) {
3630 global $smwgIQRunningNumber;
37 -
 31+ $this->isHTML = true;
 32+
3833 $t = "";
3934 // print all result rows
4035 $first = true;
@@ -58,7 +53,6 @@
5954 }
6055 }
6156 return '<img src="http://chart.apis.google.com/chart?cht=p3&chs=' . $this->m_width . 'x' . $this->m_height . '&chds=0,' . $max . '&chd=t:' . $t . '&chl=' . $n . '" width="' . $this->m_width . '" height="' . $this->m_height . '" />';
62 -
6357 }
6458
6559 }
\ No newline at end of file
Index: trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php
@@ -25,16 +25,7 @@
2626 protected $m_graphSize="";
2727 protected $m_labelArray = array();
2828 protected $m_graphColors = array("black","red","green","blue","darkviolet","gold","deeppink","brown","bisque","darkgreen","yellow","darkblue","magenta","steelblue2");
29 - public function getResult($results, $params, $outputmode) {
3029
31 - $result = parent::getResult($results, $params, $outputmode);
32 -
33 - $this->readParameters($params,$outputmode);
34 -
35 - return array($result, 'isHTML' => true);
36 -
37 - }
38 -
3930 protected function readParameters($params,$outputmode) {
4031
4132 SMWResultPrinter::readParameters($params,$outputmode);
@@ -79,6 +70,7 @@
8071 }
8172 protected function getResultText($res, $outputmode) {
8273 $wgGraphVizSettings = new GraphVizSettings;
 74+ $this->isHTML = true;
8375
8476 $key=0;
8577 // Create text graph

Status & tagging log