r55780 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55779‎ | r55780 | r55781 >
Date:17:31, 3 September 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.3.4
Modified paths:
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php
@@ -35,18 +35,17 @@
3636
3737 /**
3838 * @see MapsMapFeature::addFormDependencies()
39 - *
40 - * @param string $output
 39+ *
4140 */
42 - protected function addFormDependencies(&$output) {
 41+ protected function addFormDependencies() {
4342 global $wgJsMimeType;
4443 global $smgIncludePath, $smgYahooFormsOnThisPage;
4544
46 - MapsYahooMapsUtils::addYMapDependencies($output);
 45+ MapsYahooMapsUtils::addYMapDependencies($this->output);
4746
4847 if (empty($smgYahooFormsOnThisPage)) {
4948 $smgYahooFormsOnThisPage = 0;
50 - $output .= "<script type='$wgJsMimeType' src='$smgIncludePath/YahooMaps/SM_YahooMapsFunctions.js'></script>";
 49+ $this->output .= "<script type='$wgJsMimeType' src='$smgIncludePath/YahooMaps/SM_YahooMapsFunctions.js'></script>";
5150 }
5251 }
5352
@@ -57,7 +56,7 @@
5857 protected function doMapServiceLoad() {
5958 global $egYahooMapsOnThisPage, $smgYahooFormsOnThisPage;
6059
61 - self::addFormDependencies($this->output);
 60+ self::addFormDependencies();
6261
6362 $egYahooMapsOnThisPage++;
6463 $smgYahooFormsOnThisPage++;
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php
@@ -35,18 +35,17 @@
3636
3737 /**
3838 * @see MapsMapFeature::addFormDependencies()
39 - *
40 - * @param string $output
 39+ *
4140 */
42 - protected function addFormDependencies(&$output) {
 41+ protected function addFormDependencies() {
4342 global $wgJsMimeType;
4443 global $smgIncludePath, $smgOLFormsOnThisPage;
4544
46 - MapsOpenLayersUtils::addOLDependencies($output);
 45+ MapsOpenLayersUtils::addOLDependencies($this->output);
4746
4847 if (empty($smgOLFormsOnThisPage)) {
4948 $smgOLFormsOnThisPage = 0;
50 - $output .= "<script type='$wgJsMimeType' src='$smgIncludePath/OpenLayers/SM_OpenLayersFunctions.js'></script>";
 49+ $this->output .= "<script type='$wgJsMimeType' src='$smgIncludePath/OpenLayers/SM_OpenLayersFunctions.js'></script>";
5150 }
5251 }
5352
@@ -57,7 +56,7 @@
5857 protected function doMapServiceLoad() {
5958 global $egOpenLayersOnThisPage, $smgOLFormsOnThisPage;
6059
61 - self::addFormDependencies($this->output);
 60+ self::addFormDependencies();
6261
6362 $egOpenLayersOnThisPage++;
6463 $smgOLFormsOnThisPage++;
Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -29,6 +29,9 @@
3030 $smgIP = $IP . '/extensions/SemanticMaps';
3131 $smgIncludePath = $wgServer . $smgScriptPath;
3232
 33+// Include the settings file
 34+require_once($smgIP . '/SM_Settings.php');
 35+
3336 // Add the extensions initializing function
3437 if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
3538 $wgHooks['ParserFirstCallInit'][] = 'smfSetup';
@@ -60,12 +63,12 @@
6164 *
6265 */
6366 function smfSetup() {
64 - global $wgExtensionCredits, $egMapsServices;
 67+ global $wgExtensionCredits, $wgLang, $egMapsServices, $sfgFormPrinter;
6568
6669 // Creation of a list of internationalized service names
6770 $services = array();
6871 foreach (array_keys($egMapsServices) as $name) $services[] = wfMsg('maps_'.$name);
69 - $services_list = implode(', ', $services);
 72+ $services_list = $wgLang->listToText($services);
7073
7174 wfLoadExtensionMessages( 'SemanticMaps' );
7275
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php
@@ -38,17 +38,16 @@
3939 /**
4040 * @see MapsMapFeature::addFormDependencies()
4141 *
42 - * @param string $output
4342 */
44 - protected function addFormDependencies(&$output) {
 43+ protected function addFormDependencies() {
4544 global $wgJsMimeType;
4645 global $smgIncludePath, $smgGoogleFormsOnThisPage;
4746
48 - MapsGoogleMapsUtils::addGMapDependencies($output);
 47+ MapsGoogleMapsUtils::addGMapDependencies($this->output);
4948
5049 if (empty($smgGoogleFormsOnThisPage)) {
5150 $smgGoogleFormsOnThisPage = 0;
52 - $output .= "<script type='$wgJsMimeType' src='$smgIncludePath/GoogleMaps/SM_GoogleMapFunctions.js'></script>";
 51+ $this->output .= "<script type='$wgJsMimeType' src='$smgIncludePath/GoogleMaps/SM_GoogleMapsFunctions.js'></script>";
5352 }
5453 }
5554
@@ -59,7 +58,7 @@
6059 protected function doMapServiceLoad() {
6160 global $egGoogleMapsOnThisPage, $smgGoogleFormsOnThisPage;
6261
63 - self::addFormDependencies($this->output);
 62+ self::addFormDependencies();
6463
6564 $egGoogleMapsOnThisPage++;
6665 $smgGoogleFormsOnThisPage++;

Status & tagging log