r59554 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59553‎ | r59554 | r59555 >
Date:17:29, 29 November 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added getName() and getParameters() functions
Modified paths:
  • /trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GoogleBar.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GoogleBar.php
@@ -19,6 +19,10 @@
2020 }
2121 }
2222
 23+ public function getName() {
 24+ return wfMsg('srf_printername_googlebar');
 25+ }
 26+
2327 protected function getResultText($res, $outputmode) {
2428 global $smwgIQRunningNumber;
2529 $this->isHTML = true;
@@ -55,5 +59,13 @@
5660
5761 }
5862
 63+ public function getParameters() {
 64+ return array(
 65+ array('name' => 'limit', 'type' => 'int', 'description' => wfMsg('smw_paramdesc_limit')),
 66+ array('name' => 'height', 'type' => 'int', 'description' => wfMsg('srf_paramdesc_chartheight')),
 67+ array('name' => 'width', 'type' => 'int', 'description' => wfMsg('srf_paramdesc_chartwidth')),
 68+ );
 69+ }
 70+
5971 }
6072
Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php
@@ -25,6 +25,10 @@
2626 }
2727 }
2828
 29+ public function getName() {
 30+ return wfMsg('srf_printername_googlepie');
 31+ }
 32+
2933 protected function getResultText($res, $outputmode) {
3034 global $smwgIQRunningNumber;
3135 $this->isHTML = true;
@@ -55,4 +59,12 @@
5660 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 . '" />';
5761 }
5862
59 -}
\ No newline at end of file
 63+ public function getParameters() {
 64+ return array(
 65+ array('name' => 'limit', 'type' => 'int', 'description' => wfMsg('smw_paramdesc_limit')),
 66+ array('name' => 'height', 'type' => 'int', 'description' => wfMsg('srf_paramdesc_chartheight')),
 67+ array('name' => 'width', 'type' => 'int', 'description' => wfMsg('srf_paramdesc_chartwidth')),
 68+ );
 69+ }
 70+
 71+}

Status & tagging log