Changeset 1140
- Timestamp:
- 11/24/06 11:07:33 (7 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 3 modified
-
CHANGELOG (modified) (1 diff)
-
wifidog/admin/hotspot_location_map.php (modified) (2 diffs)
-
wifidog/classes/Node.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/CHANGELOG
r1139 r1140 1 1 2006-11-23 Benoit Grégoire <bock@step.polymtl.ca> 2 * Fix bug un node creation 2 * Fix bug in node creation 3 * Add error message for geooder wwhen you didn't set the country 4 * Clarify error messages and description for the geocoder. 5 * Make the google-map locator for nodes use the network center coordinates. 6 This change makes it usable when you didn't use the geocoder first. 3 7 4 8 2006-11-22 Benoit Grégoire <bock@step.polymtl.ca> -
trunk/wifidog-auth/wifidog/admin/hotspot_location_map.php
r1131 r1140 73 73 $ui->addContent('main_area_middle', $html); 74 74 75 if($node->getGisLocation() !== null) 76 { 77 $lat = $node->getGisLocation()->getLatitude(); 78 $long = $node->getGisLocation()->getLongitude(); 75 if(($gisLocation = $node->getGisLocation()) !== null && $gisLocation->getLatitude() != null) { 76 } 77 elseif(($gisLocation = $node->getNetwork()->getGisLocation()) !== null && $gisLocation->getLatitude() != null) { 78 } 79 else { 80 $html .= "<div class='error'>"._("Error: You need to set the GIS coordinates of the center of your network")."</div\n"; 81 $gisLocation = null; 82 } 83 if($gisLocation !== null) 84 {//pretty_print_r($gisLocation); 85 $lat = $gisLocation->getLatitude(); 86 $long = $gisLocation->getLongitude(); 79 87 } 80 88 else … … 94 102 $script .= "var current_marker = new GMarker(current_marker_point);\n"; 95 103 $script .= "map.addOverlay(current_marker);\n"; 96 $gis_lat_name = "node_" . md5($node->getId()) ."_gis_latitude";97 $gis_long_name = "node_" . md5($node->getId()) . "_gis_longitude";104 $gis_lat_name = "node_" . $node->getId() ."_gis_latitude"; 105 $gis_long_name = "node_" . $node->getId() . "_gis_longitude"; 98 106 $script .= "function setLocationInOriginalWindow() {\n"; 99 107 $script .= " window.opener.document.getElementById(\"$gis_lat_name\").value = current_marker_point.y;\n"; -
trunk/wifidog-auth/wifidog/classes/Node.php
r1139 r1140 988 988 // Call the geocoding service, if Google Maps is enabled then use Google Maps to let the user choose a more precise location 989 989 if (defined('GMAPS_HOTSPOTS_MAP_ENABLED') && GMAPS_HOTSPOTS_MAP_ENABLED === true) { 990 $_data = InterfaceElements::generateInputSubmit("geocode_only", _("Geocode only"), "geocode_only_submit");990 $_data = InterfaceElements::generateInputSubmit("geocode_only", _("Geocode the address or postal code above"), "geocode_only_submit"); 991 991 $_data .= InterfaceElements::generateInputButton("google_maps_geocode", _("Check using Google Maps"), "google_maps_geocode_button", "submit", array("onclick" => "window.open('hotspot_location_map.php?node_id={$this->getId()}', 'hotspot_location', 'toolbar = 0, scrollbars = 1, resizable = 1, location = 0, statusbar = 0, menubar = 0, width = 600, height = 600');")); 992 992 $_data .= InterfaceElements::generateDiv("(" . _("Use a geocoding service, then use Google Maps to pinpoint the exact location.") . ")", "admin_section_hint", "node_gis_geocode_hint"); 993 993 } else { 994 $_data = InterfaceElements::generateInputSubmit("geocode_only", _("Geocode location"), "geocode_only_submit");994 $_data = InterfaceElements::generateInputSubmit("geocode_only", _("Geocode the address or postal code above"), "geocode_only_submit"); 995 995 $_data .= InterfaceElements::generateDiv("(" . _("Use a geocoding service") . ")", "admin_section_hint", "node_gis_geocode_hint"); 996 996 } … … 1088 1088 { 1089 1089 $user = User::getCurrentUser(); 1090 1090 //pretty_print_r($_REQUEST); 1091 1091 if (!$this->isOwner($user) && !$user->isSuperAdmin()) { 1092 1092 throw new Exception(_('Access denied!')); … … 1194 1194 $this->_warningMessage = _("You must enter a valid address."); 1195 1195 } 1196 else 1197 { 1198 $this->_warningMessage = _("Unable to create geocoder. Are you sure you set the country?"); 1199 } 1196 1200 } 1197 1201 else
