r100912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100911‎ | r100912 | r100913 >
Date:00:16, 27 October 2011
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
kill obsolete bc code
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
@@ -44,12 +44,7 @@
4545
4646 // use numeric sortkey
4747 if ( $object->isNumeric() ) {
48 - // getDataItem was introduced in SMW 1.6, getValueKey was deprecated in the same version.
49 - if ( method_exists( $object, 'getDataItem' ) ) {
50 - $nr = $object->getDataItem()->getSortKey();
51 - } else {
52 - $nr = $object->getValueKey();
53 - }
 48+ $nr = $object->getDataItem()->getSortKey();
5449
5550 $count++;
5651 $max = max( $max, $nr );
@@ -76,6 +71,8 @@
7772 }
7873
7974 public function getParameters() {
 75+ $this->supportsGroupBy = true;
 76+
8077 $params = parent::getParameters();
8178
8279 // $params['height'] = new Parameter( 'height', Parameter::TYPE_INTEGER, 250 );
Index: trunk/extensions/SemanticResultFormats/GoogleCharts/SRF_GooglePie.php
@@ -45,12 +45,7 @@
4646 while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) {
4747 // use numeric sortkey
4848 if ( $object->isNumeric() ) {
49 - // getDataItem was introduced in SMW 1.6, getValueKey was deprecated in the same version.
50 - if ( method_exists( $object, 'getDataItem' ) ) {
51 - $nr = $object->getDataItem()->getSortKey();
52 - } else {
53 - $nr = $object->getValueKey();
54 - }
 49+ $nr = $object->getDataItem()->getSortKey();
5550
5651 $max = max( $max, $nr );
5752

Follow-up revisions

RevisionCommit summaryAuthorDate
r100999Follow up to r100912; r100876jeroendedauw16:40, 27 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:54, 27 October 2011

Why is

+		$this->supportsGroupBy = true;

set inside getParameters?

#Comment by Jeroen De Dauw (talk | contribs)   14:37, 27 October 2011

Oops... Didn't mean to commit that test code. Good catch.

Status & tagging log