r69374 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69373‎ | r69374 | r69375 >
Date:02:01, 15 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6.5 - refactoring, including mainly JS improvements
Modified paths:
  • /trunk/extensions/SemanticMaps/Features/FormInputs/SM_FormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php
@@ -26,6 +26,8 @@
2727 * @see SMMapPrinter::addSpecificMapHTML
2828 */
2929 public function addSpecificMapHTML() {
 30+ global $wgLang;
 31+
3032 $mapName = $this->service->getMapId();
3133
3234 $this->output .= Html::element(
Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -35,7 +35,7 @@
3636
3737 // Only initialize the extension when all dependencies are present.
3838 if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) {
39 - define( 'SM_VERSION', '0.6.5 a3' );
 39+ define( 'SM_VERSION', '0.6.5 a4' );
4040
4141 $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
4242 $smgScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps';
Index: trunk/extensions/SemanticMaps/Features/FormInputs/SM_FormInput.php
@@ -51,6 +51,36 @@
5252 */
5353 public function __construct( MapsMappingService $service ) {
5454 $this->service = $service;
 55+ }
 56+
 57+ /**
 58+ * Returns the specific parameters by first checking if they have been initialized yet,
 59+ * doing to work if this is not the case, and then returning them.
 60+ *
 61+ * @since 0.6.5
 62+ *
 63+ * @return array
 64+ */
 65+ public final function getSpecificParameterInfo() {
 66+ if ( $this->specificParameters === false ) {
 67+ $this->specificParameters = array();
 68+ $this->initSpecificParamInfo( $this->specificParameters );
 69+ }
 70+
 71+ return $this->specificParameters;
 72+ }
 73+
 74+ /**
 75+ * Initializes the specific parameters.
 76+ *
 77+ * Override this method to set parameters specific to a feature service comibination in
 78+ * the inheriting class.
 79+ *
 80+ * @since 0.6.5
 81+ *
 82+ * @param array $parameters
 83+ */
 84+ protected function initSpecificParamInfo( array &$parameters ) {
5585 }
5686
5787 /**
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
@@ -187,7 +187,7 @@
188188 *
189189 * @return array
190190 */
191 - public final function getResult( SMWQueryResult $results, array $params, $outputmode ) {
 191+ public final function getResult( /* SMWQueryResult */ $results, /* array */ $params, $outputmode ) {
192192 // Skip checks, results with 0 entries are normal.
193193 $this->readParameters( $params, $outputmode );
194194

Status & tagging log