r55923 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55922‎ | r55923 | r55924 >
Date:13:18, 7 September 2009
Author:ialex
Status:deferred
Tags:
Comment:
* svn:eol-style native
* svn:mime-type image/svg+xml on extensions/LiquidThreads/icons/quote.svg
Modified paths:
  • /trunk/extensions/LiquidThreads/api/ApiQueryLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/icons/quote.svg (modified) (history)
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js (modified) (history)
  • /trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFunctions.js (modified) (history)
  • /trunk/extensions/SemanticMaps/SM_Settings.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFunctions.js (modified) (history)
  • /trunk/extensions/Translate/groups/OpenStreetMap/README (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.i18n.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_File.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_UDP.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_XMPP.class.php (modified) (history)
  • /trunk/phase3/maintenance/migrateUserGroup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/migrateUserGroup.php
@@ -1,70 +1,70 @@
2 -<?php
3 -/**
4 - * Re-assign users from an old group to a new one
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License along
17 - * with this program; if not, write to the Free Software Foundation, Inc.,
18 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 - * http://www.gnu.org/copyleft/gpl.html
20 - *
21 - * @ingroup Maintenance
22 - */
23 -
24 -require_once( dirname(__FILE__) . '/Maintenance.php' );
25 -
26 -class MigrateUserGroup extends Maintenance {
27 - public function __construct() {
28 - parent::__construct();
29 - $this->mDescription = "Re-assign users from an old group to a new one";
30 - $this->addArg( 'oldgroup', 'Old user group key', true );
31 - $this->addArg( 'newgroup', 'New user group key', true );
32 - $this->setBatchSize( 200 );
33 - }
34 -
35 - public function execute() {
36 - $count = 0;
37 - $oldGroup = $this->getArg( 0 );
38 - $newGroup = $this->getArg( 1 );
39 - $dbw = wfGetDB( DB_MASTER );
40 - $start = $dbw->selectField( 'user_groups', 'MIN(ug_user)',
41 - array('ug_group' => $oldGroup), __FUNCTION__ );
42 - $end = $dbw->selectField( 'user_groups', 'MAX(ug_user)',
43 - array('ug_group' => $oldGroup), __FUNCTION__ );
44 - if( $start === null ) {
45 - $this->error( "Nothing to do - no users in the '$oldGroup' group", true );
46 - }
47 - # Do remaining chunk
48 - $end += $this->mBatchSize - 1;
49 - $blockStart = $start;
50 - $blockEnd = $start + $this->mBatchSize - 1;
51 - // Migrate users over in batches...
52 - while( $blockEnd <= $end ) {
53 - $this->output( "Doing users $blockStart to $blockEnd\n" );
54 - $dbw->begin();
55 - $dbw->update( 'user_groups',
56 - array('ug_group' => $newGroup),
57 - array('ug_group' => $oldGroup,
58 - "ug_user BETWEEN $blockStart AND $blockEnd" )
59 - );
60 - $count += $dbw->affectedRows();
61 - $dbw->commit();
62 - $blockStart += $this->mBatchSize;
63 - $blockEnd += $this->mBatchSize;
64 - wfWaitForSlaves( 5 );
65 - }
66 - $this->output( "Done! $count user(s) in group '$oldGroup' are now in '$newGroup' instead.\n" );
67 - }
68 -}
69 -
70 -$maintClass = "MigrateUserGroup";
71 -require_once( DO_MAINTENANCE );
 2+<?php
 3+/**
 4+ * Re-assign users from an old group to a new one
 5+ *
 6+ * This program is free software; you can redistribute it and/or modify
 7+ * it under the terms of the GNU General Public License as published by
 8+ * the Free Software Foundation; either version 2 of the License, or
 9+ * (at your option) any later version.
 10+ *
 11+ * This program is distributed in the hope that it will be useful,
 12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 14+ * GNU General Public License for more details.
 15+ *
 16+ * You should have received a copy of the GNU General Public License along
 17+ * with this program; if not, write to the Free Software Foundation, Inc.,
 18+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 19+ * http://www.gnu.org/copyleft/gpl.html
 20+ *
 21+ * @ingroup Maintenance
 22+ */
 23+
 24+require_once( dirname(__FILE__) . '/Maintenance.php' );
 25+
 26+class MigrateUserGroup extends Maintenance {
 27+ public function __construct() {
 28+ parent::__construct();
 29+ $this->mDescription = "Re-assign users from an old group to a new one";
 30+ $this->addArg( 'oldgroup', 'Old user group key', true );
 31+ $this->addArg( 'newgroup', 'New user group key', true );
 32+ $this->setBatchSize( 200 );
 33+ }
 34+
 35+ public function execute() {
 36+ $count = 0;
 37+ $oldGroup = $this->getArg( 0 );
 38+ $newGroup = $this->getArg( 1 );
 39+ $dbw = wfGetDB( DB_MASTER );
 40+ $start = $dbw->selectField( 'user_groups', 'MIN(ug_user)',
 41+ array('ug_group' => $oldGroup), __FUNCTION__ );
 42+ $end = $dbw->selectField( 'user_groups', 'MAX(ug_user)',
 43+ array('ug_group' => $oldGroup), __FUNCTION__ );
 44+ if( $start === null ) {
 45+ $this->error( "Nothing to do - no users in the '$oldGroup' group", true );
 46+ }
 47+ # Do remaining chunk
 48+ $end += $this->mBatchSize - 1;
 49+ $blockStart = $start;
 50+ $blockEnd = $start + $this->mBatchSize - 1;
 51+ // Migrate users over in batches...
 52+ while( $blockEnd <= $end ) {
 53+ $this->output( "Doing users $blockStart to $blockEnd\n" );
 54+ $dbw->begin();
 55+ $dbw->update( 'user_groups',
 56+ array('ug_group' => $newGroup),
 57+ array('ug_group' => $oldGroup,
 58+ "ug_user BETWEEN $blockStart AND $blockEnd" )
 59+ );
 60+ $count += $dbw->affectedRows();
 61+ $dbw->commit();
 62+ $blockStart += $this->mBatchSize;
 63+ $blockEnd += $this->mBatchSize;
 64+ wfWaitForSlaves( 5 );
 65+ }
 66+ $this->output( "Done! $count user(s) in group '$oldGroup' are now in '$newGroup' instead.\n" );
 67+ }
 68+}
 69+
 70+$maintClass = "MigrateUserGroup";
 71+require_once( DO_MAINTENANCE );
Property changes on: trunk/phase3/maintenance/migrateUserGroup.php
___________________________________________________________________
Name: svn:eol-style
7272 + native
Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFunctions.js
@@ -1,54 +1,54 @@
2 - /**
3 - * Javascript functions for Yahoo! Maps functionallity in Semantic Maps
4 - *
5 - * @file SM_YahooMapsFunctions.js
6 - * @ingroup SemanticMaps
7 - *
8 - * @author Jeroen De Dauw
9 - */
10 -
11 -/**
12 - * This function holds spesific functionallity for the Yahoo! Maps form input of Semantic Maps
13 - * TODO: Refactor as much code as possible to non specific functions
14 - */
15 -function makeFormInputYahooMap(mapName, locationFieldName, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon) {
16 - var map = createYahooMap(document.getElementById(mapName), new YGeoPoint(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getYMarkerData(marker_lat, marker_lon, '', '', '')]);
17 -
18 - // Show a starting marker only if marker coordinates are provided
19 - if (marker_lat != null && marker_lon != null) {
20 - map.addOverlay(createYMarker(new YGeoPoint(marker_lat, marker_lon)));
21 - }
22 -
23 - // Click event handler for updating the location of the marker
24 - YEvent.Capture(map, EventsList.MouseClick,
25 - function(_e, point) {
26 - var loc = new YGeoPoint(point.Lat, point.Lon)
27 - map.removeMarkersAll();
28 - document.getElementById(locationFieldName).value = convertLatToDMS(point.Lat)+', '+convertLngToDMS(point.Lon);
29 - map.addMarker(loc);
30 - map.panToLatLon(loc);
31 - }
32 - );
33 -
34 - // Make the map variable available for other functions
35 - if (!window.YMaps) window.YMaps = new Object;
36 - eval("window.YMaps." + mapName + " = map;");
37 -}
38 -
39 -/**
40 - * This function holds spesific functionallity for the Yahoo! Maps form input of Semantic Maps
41 - * TODO: Refactor as much code as possible to non specific functions
42 - */
43 -function showYAddress(address, mapName, outputElementName, notFoundFormat) {
44 - var map = YMaps[mapName];
45 -
46 - map.removeMarkersAll();
47 - map.drawZoomAndCenter(address);
48 -
49 - YEvent.Capture(map, EventsList.onEndGeoCode,
50 - function(resultObj) {
51 - map.addOverlay(new YMarker(resultObj.GeoPoint));
52 - document.getElementById(outputElementName).value = convertLatToDMS(resultObj.GeoPoint.Lat) + ', ' + convertLngToDMS(resultObj.GeoPoint.Lon);
53 - }
54 - );
 2+ /**
 3+ * Javascript functions for Yahoo! Maps functionallity in Semantic Maps
 4+ *
 5+ * @file SM_YahooMapsFunctions.js
 6+ * @ingroup SemanticMaps
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds spesific functionallity for the Yahoo! Maps form input of Semantic Maps
 13+ * TODO: Refactor as much code as possible to non specific functions
 14+ */
 15+function makeFormInputYahooMap(mapName, locationFieldName, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon) {
 16+ var map = createYahooMap(document.getElementById(mapName), new YGeoPoint(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getYMarkerData(marker_lat, marker_lon, '', '', '')]);
 17+
 18+ // Show a starting marker only if marker coordinates are provided
 19+ if (marker_lat != null && marker_lon != null) {
 20+ map.addOverlay(createYMarker(new YGeoPoint(marker_lat, marker_lon)));
 21+ }
 22+
 23+ // Click event handler for updating the location of the marker
 24+ YEvent.Capture(map, EventsList.MouseClick,
 25+ function(_e, point) {
 26+ var loc = new YGeoPoint(point.Lat, point.Lon)
 27+ map.removeMarkersAll();
 28+ document.getElementById(locationFieldName).value = convertLatToDMS(point.Lat)+', '+convertLngToDMS(point.Lon);
 29+ map.addMarker(loc);
 30+ map.panToLatLon(loc);
 31+ }
 32+ );
 33+
 34+ // Make the map variable available for other functions
 35+ if (!window.YMaps) window.YMaps = new Object;
 36+ eval("window.YMaps." + mapName + " = map;");
 37+}
 38+
 39+/**
 40+ * This function holds spesific functionallity for the Yahoo! Maps form input of Semantic Maps
 41+ * TODO: Refactor as much code as possible to non specific functions
 42+ */
 43+function showYAddress(address, mapName, outputElementName, notFoundFormat) {
 44+ var map = YMaps[mapName];
 45+
 46+ map.removeMarkersAll();
 47+ map.drawZoomAndCenter(address);
 48+
 49+ YEvent.Capture(map, EventsList.onEndGeoCode,
 50+ function(resultObj) {
 51+ map.addOverlay(new YMarker(resultObj.GeoPoint));
 52+ document.getElementById(outputElementName).value = convertLatToDMS(resultObj.GeoPoint.Lat) + ', ' + convertLngToDMS(resultObj.GeoPoint.Lon);
 53+ }
 54+ );
5555 }
\ No newline at end of file
Property changes on: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFunctions.js
___________________________________________________________________
Name: svn:eol-style
5656 + native
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFunctions.js
@@ -1,118 +1,118 @@
2 - /**
3 - * Javascript functions for OpenLayers functionallity in Semantic Maps
4 - *
5 - * @file SM_OpenLayersFunctions.js
6 - * @ingroup SemanticMaps
7 - *
8 - * @author Jeroen De Dauw
9 - */
10 -
11 -/**
12 - * This function holds spesific functionallity for the Open Layers form input of Semantic Maps
13 - * TODO: Refactor as much code as possible to non specific functions
14 - */
15 -function makeFormInputOpenLayer(mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls) {
16 - var markers = Array();
17 -
18 - // Show a starting marker only if marker coordinates are provided
19 - if (marker_lat != null && marker_lon != null) {
20 - markers.push(getOLMarkerData(marker_lon, marker_lat, '', ''));
21 - }
22 -
23 - // Click event handler for updating the location of the marker
24 - // TODO / FIXME: This will probably cause problems when used for multiple maps on one page.
25 - OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
26 - defaultHandlerOptions: {
27 - 'single': true,
28 - 'double': false,
29 - 'pixelTolerance': 0,
30 - 'stopSingle': false,
31 - 'stopDouble': false
32 - },
33 -
34 - initialize: function(options) {
35 - this.handlerOptions = OpenLayers.Util.extend(
36 - {}, this.defaultHandlerOptions
37 - );
38 - OpenLayers.Control.prototype.initialize.apply(
39 - this, arguments
40 - );
41 - this.handler = new OpenLayers.Handler.Click(
42 - this, {
43 - 'click': this.trigger
44 - }, this.handlerOptions
45 - );
46 - },
47 -
48 - trigger: function(e) {
49 - replaceMarker(mapName, map.getLonLatFromViewPortPx(e.xy));
50 - document.getElementById(locationFieldName).value = convertLatToDMS(map.getLonLatFromViewPortPx(e.xy).lat)+', '+convertLngToDMS(map.getLonLatFromViewPortPx(e.xy).lon);
51 - }
52 -
53 - });
54 -
55 - var clickHanler = new OpenLayers.Control.Click();
56 - controls.push(clickHanler);
57 -
58 - var map = initOpenLayer(mapName, lon, lat, zoom, layers, controls, markers);
59 -
60 - // Make the map variable available for other functions
61 - if (!window.OLMaps) window.OLMaps = new Object;
62 - eval("window.OLMaps." + mapName + " = map;");
63 -}
64 -
65 -
66 -/**
67 - * This function holds spesific functionallity for the Open Layers form input of Semantic Maps
68 - * TODO: Refactor as much code as possible to non specific functions
69 - */
70 -function showOLAddress(address, mapName, outputElementName, notFoundFormat) {
71 -
72 - var map = OLMaps[mapName];
73 - var geocoder = new GClientGeocoder();
74 -
75 - geocoder.getLatLng(address,
76 - function(point) {
77 - if (!point) {
78 - window.alert(address + ' ' + notFoundFormat);
79 - } else {
80 - var loc = new OpenLayers.LonLat(point.x, point.y);
81 -
82 - replaceMarker(mapName, loc);
83 - document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
84 - }
85 - }
86 - );
87 -
88 -}
89 -
90 -/**
91 - * Remove all markers from an OL map (that's in window.OLMaps), and pplace a new one.
92 - *
93 - * @param mapName Name of the map as in OLMaps[mapName].
94 - * @param newLocation The location for the new marker.
95 - * @return
96 - */
97 -function replaceMarker(mapName, newLocation) {
98 - var map = OLMaps[mapName];
99 - var markerLayer = map.getLayer('markerLayer');
100 -
101 - removeMarkers(markerLayer);
102 - markerLayer.addMarker(getOLMarker(markerLayer, getOLMarkerData(newLocation.lon, newLocation.lat, '', ''), map.getProjectionObject()));
103 -
104 - map.panTo(newLocation);
105 -}
106 -
107 -/**
108 - * Removes all markers from a marker layer.
109 - *
110 - * @param markerLayer The layer to remove all markers from.
111 - * @return
112 - */
113 -function removeMarkers(markerLayer) {
114 - var markerCollection = markerLayer.markers;
115 -
116 - for (i in markerCollection) {
117 - markerLayer.removeMarker(markerCollection[i]);
118 - }
 2+ /**
 3+ * Javascript functions for OpenLayers functionallity in Semantic Maps
 4+ *
 5+ * @file SM_OpenLayersFunctions.js
 6+ * @ingroup SemanticMaps
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds spesific functionallity for the Open Layers form input of Semantic Maps
 13+ * TODO: Refactor as much code as possible to non specific functions
 14+ */
 15+function makeFormInputOpenLayer(mapName, locationFieldName, lat, lon, zoom, marker_lat, marker_lon, layers, controls) {
 16+ var markers = Array();
 17+
 18+ // Show a starting marker only if marker coordinates are provided
 19+ if (marker_lat != null && marker_lon != null) {
 20+ markers.push(getOLMarkerData(marker_lon, marker_lat, '', ''));
 21+ }
 22+
 23+ // Click event handler for updating the location of the marker
 24+ // TODO / FIXME: This will probably cause problems when used for multiple maps on one page.
 25+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
 26+ defaultHandlerOptions: {
 27+ 'single': true,
 28+ 'double': false,
 29+ 'pixelTolerance': 0,
 30+ 'stopSingle': false,
 31+ 'stopDouble': false
 32+ },
 33+
 34+ initialize: function(options) {
 35+ this.handlerOptions = OpenLayers.Util.extend(
 36+ {}, this.defaultHandlerOptions
 37+ );
 38+ OpenLayers.Control.prototype.initialize.apply(
 39+ this, arguments
 40+ );
 41+ this.handler = new OpenLayers.Handler.Click(
 42+ this, {
 43+ 'click': this.trigger
 44+ }, this.handlerOptions
 45+ );
 46+ },
 47+
 48+ trigger: function(e) {
 49+ replaceMarker(mapName, map.getLonLatFromViewPortPx(e.xy));
 50+ document.getElementById(locationFieldName).value = convertLatToDMS(map.getLonLatFromViewPortPx(e.xy).lat)+', '+convertLngToDMS(map.getLonLatFromViewPortPx(e.xy).lon);
 51+ }
 52+
 53+ });
 54+
 55+ var clickHanler = new OpenLayers.Control.Click();
 56+ controls.push(clickHanler);
 57+
 58+ var map = initOpenLayer(mapName, lon, lat, zoom, layers, controls, markers);
 59+
 60+ // Make the map variable available for other functions
 61+ if (!window.OLMaps) window.OLMaps = new Object;
 62+ eval("window.OLMaps." + mapName + " = map;");
 63+}
 64+
 65+
 66+/**
 67+ * This function holds spesific functionallity for the Open Layers form input of Semantic Maps
 68+ * TODO: Refactor as much code as possible to non specific functions
 69+ */
 70+function showOLAddress(address, mapName, outputElementName, notFoundFormat) {
 71+
 72+ var map = OLMaps[mapName];
 73+ var geocoder = new GClientGeocoder();
 74+
 75+ geocoder.getLatLng(address,
 76+ function(point) {
 77+ if (!point) {
 78+ window.alert(address + ' ' + notFoundFormat);
 79+ } else {
 80+ var loc = new OpenLayers.LonLat(point.x, point.y);
 81+
 82+ replaceMarker(mapName, loc);
 83+ document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
 84+ }
 85+ }
 86+ );
 87+
 88+}
 89+
 90+/**
 91+ * Remove all markers from an OL map (that's in window.OLMaps), and pplace a new one.
 92+ *
 93+ * @param mapName Name of the map as in OLMaps[mapName].
 94+ * @param newLocation The location for the new marker.
 95+ * @return
 96+ */
 97+function replaceMarker(mapName, newLocation) {
 98+ var map = OLMaps[mapName];
 99+ var markerLayer = map.getLayer('markerLayer');
 100+
 101+ removeMarkers(markerLayer);
 102+ markerLayer.addMarker(getOLMarker(markerLayer, getOLMarkerData(newLocation.lon, newLocation.lat, '', ''), map.getProjectionObject()));
 103+
 104+ map.panTo(newLocation);
 105+}
 106+
 107+/**
 108+ * Removes all markers from a marker layer.
 109+ *
 110+ * @param markerLayer The layer to remove all markers from.
 111+ * @return
 112+ */
 113+function removeMarkers(markerLayer) {
 114+ var markerCollection = markerLayer.markers;
 115+
 116+ for (i in markerCollection) {
 117+ markerLayer.removeMarker(markerCollection[i]);
 118+ }
119119 }
\ No newline at end of file
Property changes on: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFunctions.js
___________________________________________________________________
Name: svn:eol-style
120120 + native
Index: trunk/extensions/SemanticMaps/SM_Settings.php
@@ -1,31 +1,31 @@
2 -<?php
3 -
4 -/**
5 - * File defining the settings for the Semantic Maps extension
6 - * More info can be found at http://www.mediawiki.org/wiki/Extension:Semantic Maps#Settings
7 - *
8 - * NOTICE:
9 - * Changing one of these settings can be done by copieng or cutting it,
10 - * and placing it in LocalSettings.php, AFTER the inclusion of Semantic Maps.
11 - *
12 - * @file SM_Settings.php
13 - * @ingroup SemanticMaps
14 - *
15 - * @author Jeroen De Dauw
16 - */
17 -
18 -if( !defined( 'MEDIAWIKI' ) ) {
19 - die( 'Not an entry point.' );
20 -}
21 -
22 -
23 -
24 -
25 -# Map features configuration
26 -# (named) Array of String. This array contains the available features for Maps.
27 -# The array element name contains an abbriviation, used for code references,
28 -# and in the service data arrays, the value is the human readible version for displaying purpouses.
29 -$egMapsAvailableFeatures['qp'] = 'Query Printer';
30 -$egMapsAvailableFeatures['fi'] = 'Form input';
31 -
32 -
 2+<?php
 3+
 4+/**
 5+ * File defining the settings for the Semantic Maps extension
 6+ * More info can be found at http://www.mediawiki.org/wiki/Extension:Semantic Maps#Settings
 7+ *
 8+ * NOTICE:
 9+ * Changing one of these settings can be done by copieng or cutting it,
 10+ * and placing it in LocalSettings.php, AFTER the inclusion of Semantic Maps.
 11+ *
 12+ * @file SM_Settings.php
 13+ * @ingroup SemanticMaps
 14+ *
 15+ * @author Jeroen De Dauw
 16+ */
 17+
 18+if( !defined( 'MEDIAWIKI' ) ) {
 19+ die( 'Not an entry point.' );
 20+}
 21+
 22+
 23+
 24+
 25+# Map features configuration
 26+# (named) Array of String. This array contains the available features for Maps.
 27+# The array element name contains an abbriviation, used for code references,
 28+# and in the service data arrays, the value is the human readible version for displaying purpouses.
 29+$egMapsAvailableFeatures['qp'] = 'Query Printer';
 30+$egMapsAvailableFeatures['fi'] = 'Form input';
 31+
 32+
Property changes on: trunk/extensions/SemanticMaps/SM_Settings.php
___________________________________________________________________
Name: svn:eol-style
3333 + native
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js
@@ -1,65 +1,65 @@
2 - /**
3 - * Javascript functions for Google Maps functionallity in Semantic Maps
4 - *
5 - * @file SM_GoogleMapFunctions.js
6 - * @ingroup SemanticMaps
7 - *
8 - * @author Jeroen De Dauw
9 - */
10 -
11 -/**
12 - * This function holds spesific functionallity for the Google Maps form input of Semantic Maps
13 - * TODO: Refactor as much code as possible to non specific functions
14 - */
15 -function makeFormInputGoogleMap(mapName, locationFieldName, width, height, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon) {
16 - if (GBrowserIsCompatible()) { // TODO: This function should probably be used after the loading of the G Maps API
17 - var map = createGoogleMap(document.getElementById(mapName), new GSize(width, height), new GLatLng(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getGMarkerData(marker_lat, marker_lon, '', '', '')]);
18 -
19 - // Show a starting marker only if marker coordinates are provided
20 - if (marker_lat != null && marker_lon != null) {
21 - map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon)));
22 - }
23 -
24 - // Click event handler for updating the location of the marker
25 - GEvent.addListener(map, "click",
26 - function(overlay, point) {
27 - if (overlay) {
28 - map.removeOverlay(overlay);
29 - } else {
30 - map.clearOverlays();
31 - document.getElementById(locationFieldName).value = convertLatToDMS(point.y)+', '+convertLngToDMS(point.x);
32 - map.addOverlay(new GMarker(point));
33 - map.panTo(point);
34 - }
35 - }
36 - );
37 -
38 - // Make the map variable available for other functions
39 - if (!window.GMaps) window.GMaps = new Object;
40 - eval("window.GMaps." + mapName + " = map;");
41 - }
42 -}
43 -
44 -/**
45 - * This function holds spesific functionallity for the Google Maps form input of Semantic Maps
46 - * TODO: Refactor as much code as possible to non specific functions
47 - */
48 -function showGAddress(address, mapName, outputElementName, notFoundFormat) {
49 - var map = GMaps[mapName];
50 - var geocoder = new GClientGeocoder();
51 -
52 - geocoder.getLatLng(address,
53 - function(point) {
54 - if (!point) {
55 - window.alert(address + ' ' + notFoundFormat);
56 - } else {
57 - map.clearOverlays();
58 - map.setCenter(point, 14);
59 - var marker = new GMarker(point);
60 - map.addOverlay(marker);
61 - document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
62 - }
63 - }
64 - );
65 -
 2+ /**
 3+ * Javascript functions for Google Maps functionallity in Semantic Maps
 4+ *
 5+ * @file SM_GoogleMapFunctions.js
 6+ * @ingroup SemanticMaps
 7+ *
 8+ * @author Jeroen De Dauw
 9+ */
 10+
 11+/**
 12+ * This function holds spesific functionallity for the Google Maps form input of Semantic Maps
 13+ * TODO: Refactor as much code as possible to non specific functions
 14+ */
 15+function makeFormInputGoogleMap(mapName, locationFieldName, width, height, lat, lon, zoom, type, types, controls, scrollWheelZoom, marker_lat, marker_lon) {
 16+ if (GBrowserIsCompatible()) { // TODO: This function should probably be used after the loading of the G Maps API
 17+ var map = createGoogleMap(document.getElementById(mapName), new GSize(width, height), new GLatLng(lat, lon), zoom, type, types, controls, scrollWheelZoom, [getGMarkerData(marker_lat, marker_lon, '', '', '')]);
 18+
 19+ // Show a starting marker only if marker coordinates are provided
 20+ if (marker_lat != null && marker_lon != null) {
 21+ map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon)));
 22+ }
 23+
 24+ // Click event handler for updating the location of the marker
 25+ GEvent.addListener(map, "click",
 26+ function(overlay, point) {
 27+ if (overlay) {
 28+ map.removeOverlay(overlay);
 29+ } else {
 30+ map.clearOverlays();
 31+ document.getElementById(locationFieldName).value = convertLatToDMS(point.y)+', '+convertLngToDMS(point.x);
 32+ map.addOverlay(new GMarker(point));
 33+ map.panTo(point);
 34+ }
 35+ }
 36+ );
 37+
 38+ // Make the map variable available for other functions
 39+ if (!window.GMaps) window.GMaps = new Object;
 40+ eval("window.GMaps." + mapName + " = map;");
 41+ }
 42+}
 43+
 44+/**
 45+ * This function holds spesific functionallity for the Google Maps form input of Semantic Maps
 46+ * TODO: Refactor as much code as possible to non specific functions
 47+ */
 48+function showGAddress(address, mapName, outputElementName, notFoundFormat) {
 49+ var map = GMaps[mapName];
 50+ var geocoder = new GClientGeocoder();
 51+
 52+ geocoder.getLatLng(address,
 53+ function(point) {
 54+ if (!point) {
 55+ window.alert(address + ' ' + notFoundFormat);
 56+ } else {
 57+ map.clearOverlays();
 58+ map.setCenter(point, 14);
 59+ var marker = new GMarker(point);
 60+ map.addOverlay(marker);
 61+ document.getElementById(outputElementName).value = convertLatToDMS(point.y) + ', ' + convertLngToDMS(point.x);
 62+ }
 63+ }
 64+ );
 65+
6666 }
\ No newline at end of file
Property changes on: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js
___________________________________________________________________
Name: svn:eol-style
6767 + native
Property changes on: trunk/extensions/LiquidThreads/api/ApiQueryLQTThreads.php
___________________________________________________________________
Name: svn:eol-style
6868 + native
Property changes on: trunk/extensions/LiquidThreads/icons/quote.svg
___________________________________________________________________
Name: svn:mime-type
6969 + image/svg+xml
Property changes on: trunk/extensions/XMLRC/XMLRC.class.php
___________________________________________________________________
Name: svn:eol-style
7070 + native
Property changes on: trunk/extensions/XMLRC/XMLRC_XMPP.class.php
___________________________________________________________________
Name: svn:eol-style
7171 + native
Property changes on: trunk/extensions/XMLRC/XMLRC_UDP.class.php
___________________________________________________________________
Name: svn:eol-style
7272 + native
Property changes on: trunk/extensions/XMLRC/XMLRC.i18n.php
___________________________________________________________________
Name: svn:eol-style
7373 + native
Property changes on: trunk/extensions/XMLRC/XMLRC.php
___________________________________________________________________
Name: svn:eol-style
7474 + native
Property changes on: trunk/extensions/XMLRC/XMLRC_File.class.php
___________________________________________________________________
Name: svn:eol-style
7575 + native
Index: trunk/extensions/Translate/groups/OpenStreetMap/README
@@ -1,7 +1,7 @@
2 -# Read-only repository setup
3 -cd %GROUPROOT%
4 -mkdir osm
5 -cd osm
6 -svn co http://svn.openstreetmap.org/sites/rails_port/config/locales .
7 -
 2+# Read-only repository setup
 3+cd %GROUPROOT%
 4+mkdir osm
 5+cd osm
 6+svn co http://svn.openstreetmap.org/sites/rails_port/config/locales .
 7+
88 # TODO: commits
\ No newline at end of file
Property changes on: trunk/extensions/Translate/groups/OpenStreetMap/README
___________________________________________________________________
Name: svn:eol-style
99 + native

Status & tagging log