r97229 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97228‎ | r97229 | r97230 >
Date:01:21, 16 September 2011
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
match changes in SMW
Modified paths:
  • /trunk/extensions/SemanticMaps/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/RELEASE-NOTES
@@ -10,7 +10,8 @@
1111 === Semantic Maps 1.0.4 ===
1212 (2011-0x-xx)
1313
14 -*
 14+* Added compatibility with SMW 1.6.2 and later.
 15+* Removed compatibility with SMW 1.6.1 and earlier.
1516
1617 === Semantic Maps 1.0.3 ===
1718 (2011-09-14)
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
@@ -48,30 +48,6 @@
4949 }
5050
5151 /**
52 - * (non-PHPdoc)
53 - * @see SMWResultPrinter::readParameters()
54 - */
55 - protected function readParameters( /* array */ $params, $outputmode ) {
56 - parent::readParameters( $params, $outputmode );
57 -
58 - $validator = new Validator( $this->getName(), false );
59 - $validator->setParameters( $params, $this->getParameterInfo() );
60 - $validator->validateParameters();
61 -
62 - $fatalError = $validator->hasFatalError();
63 -
64 - if ( $fatalError === false ) {
65 - $this->parameters = $validator->getParameterValues();
66 - }
67 - else {
68 - $this->fatalErrorMsg =
69 - '<span class="errorbox">' .
70 - htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $fatalError->getMessage() ) ) .
71 - '</span>';
72 - }
73 - }
74 -
75 - /**
7652 * Returns an array containing the parameter info.
7753 *
7854 * @since 1.0
@@ -174,7 +150,7 @@
175151 if ( $this->fatalErrorMsg === false ) {
176152 global $wgParser;
177153
178 - $params = $this->parameters;
 154+ $params = $this->m_params;
179155
180156 $queryHandler = new SMQueryHandler( $res, $outputmode );
181157 $queryHandler->setShowSubject( $params['showtitle'] );

Comments

#Comment by Nikerabbit (talk | contribs)   07:53, 16 September 2011
-			$params = $this->parameters;
+			$params = $this->m_params;

This looks wrong.

#Comment by Jeroen De Dauw (talk | contribs)   12:10, 16 September 2011

It's correct. parameters is a field in the deriving class that was being used instead of m_params defined in the base class. Now this is no longer the case.

#Comment by Nikerabbit (talk | contribs)   12:50, 16 September 2011

Why is there $protected parameters; declaration then?

#Comment by Jeroen De Dauw (talk | contribs)   13:10, 16 September 2011

Because I forgot to remove it, it's gone now though.