diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-10-30 19:40:24 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-10-30 19:40:24 +0000 |
| commit | 1b31889382cf05c88218446919a18b377b17a96b (patch) | |
| tree | 28a9ef7f8c82824f8481c3a6d07cc8162449f8fc /modules/googlemap | |
| parent | fe8b71f311753b6bb7be62b697035e420fb5f056 (diff) | |
| download | webtrees-1b31889382cf05c88218446919a18b377b17a96b.tar.gz webtrees-1b31889382cf05c88218446919a18b377b17a96b.tar.bz2 webtrees-1b31889382cf05c88218446919a18b377b17a96b.zip | |
Diffstat (limited to 'modules/googlemap')
| -rw-r--r-- | modules/googlemap/flags.php | 4 | ||||
| -rw-r--r-- | modules/googlemap/googlemap.php | 64 | ||||
| -rw-r--r-- | modules/googlemap/module.php | 6 | ||||
| -rw-r--r-- | modules/googlemap/pedigree_map.php | 10 | ||||
| -rw-r--r-- | modules/googlemap/placecheck.php | 8 | ||||
| -rw-r--r-- | modules/googlemap/placehierarchy.php | 28 | ||||
| -rw-r--r-- | modules/googlemap/places.php | 14 | ||||
| -rw-r--r-- | modules/googlemap/places_edit.php | 30 | ||||
| -rw-r--r-- | modules/googlemap/wt_googlemap.js | 4 |
9 files changed, 84 insertions, 84 deletions
diff --git a/modules/googlemap/flags.php b/modules/googlemap/flags.php index dc5a1631f4..01b3197c6e 100644 --- a/modules/googlemap/flags.php +++ b/modules/googlemap/flags.php @@ -60,7 +60,7 @@ while ($file = readdir($rep)) { closedir($rep); sort($country); -if($countrySelected == "Countries") { +if ($countrySelected == "Countries") { $flags = $country; } else { @@ -80,7 +80,7 @@ if ($action == "ChangeFlag") { <script type="text/javascript"> <!-- function edit_close() { -<?php if($_POST["selcountry"] == "Countries") { ?> +<?php if ($_POST["selcountry"] == "Countries") { ?> window.opener.document.editplaces.icon.value = "places/flags/<?php echo $flags[$_POST["FLAGS"]]; ?>.gif"; window.opener.document.getElementById('flagsDiv').innerHTML = "<img src=\"places/flags/<?php echo $country[$_POST["FLAGS"]]; ?>.gif\"> <a href=\"javascript:;\" onclick=\"change_icon();return false;\"><?php echo i18n::translate('Change flag'); ?></a> <a href=\"javascript:;\" onclick=\"remove_icon();return false;\"><?php echo i18n::translate('Remove flag'); ?></a>"; <?php } else { ?> diff --git a/modules/googlemap/googlemap.php b/modules/googlemap/googlemap.php index 11e80143f0..6524d50662 100644 --- a/modules/googlemap/googlemap.php +++ b/modules/googlemap/googlemap.php @@ -38,19 +38,19 @@ if (!defined('WT_WEBTREES')) { global $SESSION_HIDE_GOOGLEMAP; $SESSION_HIDE_GOOGLEMAP = "empty"; if ((isset($_REQUEST["HIDE_GOOGLEMAP"])) && (empty($SEARCH_SPIDER))) { - if(stristr("true", $_REQUEST["HIDE_GOOGLEMAP"])) { + if (stristr("true", $_REQUEST["HIDE_GOOGLEMAP"])) { $SESSION_HIDE_GOOGLEMAP = "true"; } - if(stristr("false", $_REQUEST["HIDE_GOOGLEMAP"])) { + if (stristr("false", $_REQUEST["HIDE_GOOGLEMAP"])) { $SESSION_HIDE_GOOGLEMAP = "false"; } } // change the session values and store if needed. -if($SESSION_HIDE_GOOGLEMAP == "true") $_SESSION['hide_googlemap'] = true; -if($SESSION_HIDE_GOOGLEMAP == "false") $_SESSION['hide_googlemap'] = false; -if($SESSION_HIDE_GOOGLEMAP == "empty") { - if((isset($_SESSION['hide_googlemap'])) && ($_SESSION['hide_googlemap'] == true)) +if ($SESSION_HIDE_GOOGLEMAP == "true") $_SESSION['hide_googlemap'] = true; +if ($SESSION_HIDE_GOOGLEMAP == "false") $_SESSION['hide_googlemap'] = false; +if ($SESSION_HIDE_GOOGLEMAP == "empty") { + if ((isset($_SESSION['hide_googlemap'])) && ($_SESSION['hide_googlemap'] == true)) $SESSION_HIDE_GOOGLEMAP = "true"; else $SESSION_HIDE_GOOGLEMAP = "false"; @@ -66,7 +66,7 @@ function print_fact_place_map($factrec) { // reverse the array so that we get the top level first $levels = array_reverse($levels); $retStr .= "<a href=\"placelist.php?action=show&"; - foreach($levels as $pindex=>$ppart) { + foreach ($levels as $pindex=>$ppart) { // routine for replacing ampersands $ppart = preg_replace("/amp\%3B/", "", trim($ppart)); $retStr .= "parent[$pindex]=".PrintReady($ppart)."&"; @@ -91,7 +91,7 @@ function print_address_structure_map($factrec, $level) { $nlevel = $level+1; $ct = preg_match_all("/$level ADDR(.*)/", $factrec, $omatch, PREG_SET_ORDER); - for($i=0; $i<$ct; $i++) { + for ($i=0; $i<$ct; $i++) { $arec = get_sub_record($level, "$level ADDR", $factrec, $i+1); $resultText = ""; $cn = preg_match("/$nlevel _NAME (.*)/", $arec, $cmatch); @@ -142,25 +142,25 @@ function print_address_structure_map($factrec, $level) { } $resultText = "<table>"; $ct = preg_match_all("/$level PHON (.*)/", $factrec, $omatch, PREG_SET_ORDER); - for($i=0; $i<$ct; $i++) { + for ($i=0; $i<$ct; $i++) { $resultText .= "<tr><td><span class=\"label\"><b>".translate_fact('PHON').": </b></span></td><td><span class=\"field\">"; $resultText .= getLRM() . $omatch[$i][1]. getLRM(); $resultText .= "</span></td></tr>"; } $ct = preg_match_all("/$level FAX (.*)/", $factrec, $omatch, PREG_SET_ORDER); - for($i=0; $i<$ct; $i++) { + for ($i=0; $i<$ct; $i++) { $resultText .= "<tr><td><span class=\"label\"><b>".translate_fact('FAX').": </b></span></td><td><span class=\"field\">"; $resultText .= getLRM() . $omatch[$i][1] . getLRM(); $resultText .= "</span></td></tr>"; } $ct = preg_match_all("/$level EMAIL (.*)/", $factrec, $omatch, PREG_SET_ORDER); - for($i=0; $i<$ct; $i++) { + for ($i=0; $i<$ct; $i++) { $resultText .= "<tr><td><span class=\"label\"><b>".translate_fact('EMAIL').": </b></span></td><td><span class=\"field\">"; $resultText .= "<a href=\"mailto:".$omatch[$i][1]."\">".$omatch[$i][1]."</a>"; $resultText .= "</span></td></tr>"; } $ct = preg_match_all("/$level (WWW|URL) (.*)/", $factrec, $omatch, PREG_SET_ORDER); - for($i=0; $i<$ct; $i++) { + for ($i=0; $i<$ct; $i++) { $resultText .= "<tr><td><span class=\"label\"><b>".translate_fact('URL').": </b></span></td><td><span class=\"field\">"; $resultText .= "<a href=\"".$omatch[$i][2]."\" target=\"_blank\">".$omatch[$i][2]."</a>"; $resultText .= "</span></td></tr>"; @@ -273,7 +273,7 @@ function get_lati_long_placelocation ($place) { $parent = explode (",", $place); $parent = array_reverse($parent); $place_id = 0; - for($i=0; $i<count($parent); $i++) { + for ($i=0; $i<count($parent); $i++) { $parent[$i] = trim($parent[$i]); if (empty($parent[$i])) $parent[$i]="unknown";// GoogleMap module uses "unknown" while GEDCOM uses , , $placelist = create_possible_place_names($parent[$i], $i+1); @@ -356,19 +356,19 @@ function create_indiv_buttons() { Map_type.prototype.refresh = function() { this.button1.className = 'non_active'; - if(this.map.getCurrentMapType() != G_NORMAL_MAP) + if (this.map.getCurrentMapType() != G_NORMAL_MAP) this.button2.className = 'non_active'; else this.button2.className = 'active'; - if(this.map.getCurrentMapType() != G_SATELLITE_MAP) + if (this.map.getCurrentMapType() != G_SATELLITE_MAP) this.button3.className = 'non_active'; else this.button3.className = 'active'; - if(this.map.getCurrentMapType() != G_HYBRID_MAP) + if (this.map.getCurrentMapType() != G_HYBRID_MAP) this.button4.className = 'non_active'; else this.button4.className = 'active'; - if(this.map.getCurrentMapType() != G_PHYSICAL_MAP) + if (this.map.getCurrentMapType() != G_PHYSICAL_MAP) this.button5.className = 'non_active'; else this.button5.className = 'active'; @@ -529,12 +529,12 @@ function build_indiv_map($indifacts, $famids) { // Add children to the list if (count($famids)>0) { $hparents=false; - for($f=0; $f<count($famids); $f++) { + for ($f=0; $f<count($famids); $f++) { if (!empty($famids[$f])) { $famrec = find_gedcom_record($famids[$f], WT_GED_ID, true); if ($famrec) { $num = preg_match_all("/1\s*CHIL\s*@(.*)@/", $famrec, $smatch, PREG_SET_ORDER); - for($j=0; $j<$num; $j++) { + for ($j=0; $j<$num; $j++) { $person=Person::getInstance($smatch[$j][1]); if ($person->canDisplayDetails()) { $srec = find_person_record($smatch[$j][1], WT_GED_ID); @@ -619,7 +619,7 @@ function build_indiv_map($indifacts, $famids) { //echo "<script language=\"JavaScript\" type=\"text/javascript\">tabstyles[5]='tab_cell_inactive_empty'; document.getElementById('pagetab5').className='tab_cell_inactive_empty';</script>"; echo "</td></tr>"; echo "<script type=\"text/javascript\">"; - echo "function ResizeMap(){}</script>"; + echo "function ResizeMap() {}</script>"; if (WT_USER_IS_ADMIN) { echo "<tr><td align=\"center\" colspan=\"2\">"; echo "<a href=\"module.php?mod=googlemap&mod_action=editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; @@ -649,7 +649,7 @@ function build_indiv_map($indifacts, $famids) { if ($markers[$j]["placed"] == "no") { $multimarker = -1; // Count nr of locations where the long/lati is identical - for($k=$j; $k<=$i; $k++) + for ($k=$j; $k<=$i; $k++) if (($markers[$j]["lati"] == $markers[$k]["lati"]) && ($markers[$j]["lng"] == $markers[$k]["lng"])) $multimarker = $multimarker + 1; @@ -703,13 +703,13 @@ function build_indiv_map($indifacts, $famids) { echo '<br /><a href=\"module.php?mod=googlemap&mod_action=places&display=inactive\">', i18n::translate('Edit geographic location'), '</a>'; echo "\");"; } - else if (!$GOOGLEMAP_COORD){ + else if (!$GOOGLEMAP_COORD) { echo "\");"; } else { echo "<br /><br />"; - if ($markers[$j]["lati"]>'0'){echo "N", str_replace('-', '', $markers[$j]["lati"]);}else{ echo str_replace('-', 'S', $markers[$j]["lati"]);} + if ($markers[$j]["lati"]>'0') {echo "N", str_replace('-', '', $markers[$j]["lati"]);} else { echo str_replace('-', 'S', $markers[$j]["lati"]);} echo ", "; - if ($markers[$j]["lng"]>'0'){echo "E", str_replace('-', '', $markers[$j]["lng"]);}else{ echo str_replace('-', 'W', $markers[$j]["lng"]);} + if ($markers[$j]["lng"]>'0') {echo "E", str_replace('-', '', $markers[$j]["lng"]);} else { echo str_replace('-', 'W', $markers[$j]["lng"]);} echo "\");"; } echo "});"; @@ -757,16 +757,16 @@ function build_indiv_map($indifacts, $famids) { $date=new GedcomDate($markers[$j]["date"]); echo "<br />", addslashes($date->Display(true)); } - if (!$GOOGLEMAP_COORD){ + if (!$GOOGLEMAP_COORD) { echo "\")"; } else { echo "<br /><br />"; - if ($markers[$j]["lati"]>='0'){echo "N", str_replace('-', '', $markers[$j]["lati"]);}else{ echo str_replace('-', 'S', $markers[$j]["lati"]);} + if ($markers[$j]["lati"]>='0') {echo "N", str_replace('-', '', $markers[$j]["lati"]);} else { echo str_replace('-', 'S', $markers[$j]["lati"]);} echo ", "; - if ($markers[$j]["lng"]>='0'){echo "E", str_replace('-', '', $markers[$j]["lng"]);}else{ echo str_replace('-', 'W', $markers[$j]["lng"]);} + if ($markers[$j]["lng"]>='0') {echo "E", str_replace('-', '', $markers[$j]["lng"]);} else { echo str_replace('-', 'W', $markers[$j]["lng"]);} echo "\")"; } - for($k=$j+1; $k<=$i; $k++) { + for ($k=$j+1; $k<=$i; $k++) { if (($markers[$j]["lati"] == $markers[$k]["lati"]) && ($markers[$j]["lng"] == $markers[$k]["lng"])) { $markers[$k]["placed"] = "yes"; $markers[$k]["index"] = $indexcounter; @@ -823,13 +823,13 @@ function build_indiv_map($indifacts, $famids) { $date=new GedcomDate($markers[$k]["date"]); echo "<br />", addslashes($date->Display(true)); } - if (!$GOOGLEMAP_COORD){ + if (!$GOOGLEMAP_COORD) { echo "\")"; } else { echo "<br /><br />"; - if ($markers[$j]["lati"]>='0'){echo "N", str_replace('-', '', $markers[$j]["lati"]);}else{ echo str_replace('-', 'S', $markers[$j]["lati"]);} + if ($markers[$j]["lati"]>='0') {echo "N", str_replace('-', '', $markers[$j]["lati"]);} else { echo str_replace('-', 'S', $markers[$j]["lati"]);} echo ", "; - if ($markers[$j]["lng"]>='0'){echo "E", str_replace('-', '', $markers[$j]["lng"]);}else{ echo str_replace('-', 'W', $markers[$j]["lng"]);} + if ($markers[$j]["lng"]>='0') {echo "E", str_replace('-', '', $markers[$j]["lng"]);} else { echo str_replace('-', 'W', $markers[$j]["lng"]);} echo "\")"; } } @@ -850,7 +850,7 @@ function build_indiv_map($indifacts, $famids) { } </script> <?php echo "<div style=\"overflow: auto; overflow-x: hidden; overflow-y: auto; height: {$GOOGLEMAP_YSIZE}px;\"><table class=\"facts_table\">"; - foreach($markers as $marker) { + foreach ($markers as $marker) { echo "<tr><td class=\"facts_label\">"; echo "<a href=\"javascript:highlight({$marker["index"]}, {$marker["tabindex"]})\">{$marker["fact"]}</a></td>"; echo "<td class=\"{$marker['class']}\" style=\"white-space: normal\">"; diff --git a/modules/googlemap/module.php b/modules/googlemap/module.php index 0ba5b2c226..77c951bcf0 100644 --- a/modules/googlemap/module.php +++ b/modules/googlemap/module.php @@ -121,7 +121,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu } else { $tNew = str_replace(array("&HIDE_GOOGLEMAP=true", "&HIDE_GOOGLEMAP=false", "action=ajax&module=".$this->getName()."&"), "", $_SERVER["REQUEST_URI"]); $tNew = str_replace("&", "&", $tNew); - if($SESSION_HIDE_GOOGLEMAP=="true") { + if ($SESSION_HIDE_GOOGLEMAP=="true") { echo " <span class=\"font9\"><a href=\"".$tNew."&HIDE_GOOGLEMAP=false#".$this->getName()."\">"; echo "<img src=\"".$WT_IMAGES["plus"]."\" border=\"0\" width=\"11\" height=\"11\" alt=\"".i18n::translate('Activate')."\" title=\"".i18n::translate('Activate')."\" />"; echo " ".i18n::translate('Activate')."</a></span>"; @@ -138,9 +138,9 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu echo "</td></tr>"; echo "</table><br />"; echo "<script type=\"text/javascript\">"; - echo "function ResizeMap (){}</script>"; + echo "function ResizeMap () {}</script>"; } else { - if($SESSION_HIDE_GOOGLEMAP=="false") { + if ($SESSION_HIDE_GOOGLEMAP=="false") { echo "<table width=\"100%\" border=\"0\" class=\"facts_table\">"; echo "<tr><td valign=\"top\">"; echo "<div id=\"googlemap_left\">"; diff --git a/modules/googlemap/pedigree_map.php b/modules/googlemap/pedigree_map.php index a22ff13575..4fb5ae33b3 100644 --- a/modules/googlemap/pedigree_map.php +++ b/modules/googlemap/pedigree_map.php @@ -272,7 +272,7 @@ echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">"; echo " <tr>"; echo " <td valign=\"top\">"; // print summary statistics -if (isset($curgen)){ +if (isset($curgen)) { $total=pow(2,$curgen)-1; $miss=$total-$count-$priv; echo i18n::plural( @@ -530,11 +530,11 @@ pm_map.addControl(mini); function wheelevent(e) { - if (true){//document.getElementById("prevent").checked - if (!e){ + if (true) {//document.getElementById("prevent").checked + if (!e) { e = window.event } - if (e.preventDefault){ + if (e.preventDefault) { e.preventDefault() } e.returnValue = false; @@ -606,7 +606,7 @@ for ($i=0; $i<($controller->treesize); $i++) { addslashes($bdate->Display(false))."<br />".$bplace; $latlongval[$i] = get_lati_long_placelocation($person->getBirthPlace()); - if ($latlongval[$i] != NULL){ + if ($latlongval[$i] != NULL) { $lat[$i] = str_replace(array('N', 'S', ','), array('', '-', '.'), $latlongval[$i]["lati"]); $lon[$i] = str_replace(array('E', 'W', ','), array('', '-', '.'), $latlongval[$i]["long"]); if (!($lat[$i] == NULL && $lon[$i] == NULL) && !($lat[$i] == 0 && $lon[$i] == 0)) { diff --git a/modules/googlemap/placecheck.php b/modules/googlemap/placecheck.php index 156d137740..771a1b63e7 100644 --- a/modules/googlemap/placecheck.php +++ b/modules/googlemap/placecheck.php @@ -116,7 +116,7 @@ echo "<strong>", i18n::translate('List filtering options'), "</strong>", help_li echo "</td></tr><tr><td class='descriptionbox'>"; echo i18n::translate('Include fully matched places: '), help_link('PLACECHECK_MATCH','googlemap'); echo "</td><td class='optionbox'><input type=\"checkbox\" name=\"matching\" value=\"active\""; -if($matching==1) { +if ($matching==1) { echo " checked=\"checked\""; } echo "></td></tr>"; @@ -241,7 +241,7 @@ case 'go': $parts=count($levels); $levels=array_reverse($levels); $placestr.="<a href=\"placelist.php?action=show&"; - foreach($levels as $pindex=>$ppart) { + foreach ($levels as $pindex=>$ppart) { $ppart=urlencode(trim($ppart)); $placestr.="parent[$pindex]=".$ppart."&"; } @@ -294,14 +294,14 @@ case 'go': } } $plac[$z]="<td class='facts_value'>".$placestr2."</td>\n"; - if ($row['pl_lati']=='0'){ + if ($row['pl_lati']=='0') { $lati[$z]="<td class='facts_value error'><strong>".$row['pl_lati']."</strong></td>"; } else if ($row['pl_lati']!='') { $lati[$z]="<td class='facts_value'>".$row['pl_lati']."</td>"; } else { $lati[$z]="<td class='facts_value error' align='center'><strong>X</strong></td>";$matched[$x]++; } - if ($row['pl_long']=='0'){ + if ($row['pl_long']=='0') { $long[$z]="<td class='facts_value error'><strong>".$row['pl_long']."</strong></td>"; } else if ($row['pl_long']!='') { $long[$z]="<td class='facts_value'>".$row['pl_long']."</td>"; diff --git a/modules/googlemap/placehierarchy.php b/modules/googlemap/placehierarchy.php index 922439ec0d..3e187e251d 100644 --- a/modules/googlemap/placehierarchy.php +++ b/modules/googlemap/placehierarchy.php @@ -88,7 +88,7 @@ function get_placeid($place) { $par = array_reverse($par); $place_id = 0; if (check_exist_table()) { - for($i=0; $i<count($par); $i++) { + for ($i=0; $i<count($par); $i++) { $par[$i] = trim($par[$i]); if (empty($par[$i])) $par[$i]="unknown"; $placelist = create_possible_place_names($par[$i], $i+1); @@ -110,7 +110,7 @@ function get_p_id($place) { $par = explode (",", $place); $par = array_reverse($par); $place_id = 0; - for($i=0; $i<count($par); $i++) { + for ($i=0; $i<count($par); $i++) { $par[$i] = trim($par[$i]); $placelist = create_possible_place_names($par[$i], $i+1); foreach ($placelist as $key => $placename) { @@ -234,7 +234,7 @@ function print_how_many_people($level, $parent) { echo "<br /><br />", i18n::translate('Individuals'), ": ", $place_count_indi, ", ", i18n::translate('Families'), ": ", $place_count_fam; } -function print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $placelevels, $lastlevel=false){ +function print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $placelevels, $lastlevel=false) { global $GOOGLEMAP_COORD, $GOOGLEMAP_PH_MARKER, $GM_DISP_SHORT_PLACE, $GM_DISP_COUNT; if (($place2['lati'] == NULL) || ($place2['long'] == NULL) || (($place2['lati'] == "0") && ($place2['long'] == "0"))) { echo "var icon_type = new GIcon();\n"; @@ -356,7 +356,7 @@ function print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $place } } else { $placename = $place2['place'].$placelevels; - if ($place2['place'] == "Unknown"){ + if ($place2['place'] == "Unknown") { if (!$GM_DISP_SHORT_PLACE) { echo PrintReady(addslashes(i18n::translate('unknown').$placelevels)); } else { @@ -381,7 +381,7 @@ function print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $place } $temp=PrintReady(addslashes($place2['place'])); $temp=str_replace(array('‎', '‏'), array(WT_UTF8_LRM, WT_UTF8_RLM), $temp); - if (!$GOOGLEMAP_COORD){ + if (!$GOOGLEMAP_COORD) { echo "<br /><br /></div></td>\", icon_type, \"", $temp, "\");\n"; } else { echo "<br /><br />", $place2['lati'], ", ", $place2['long'], "</div></td>\", icon_type, \"", $temp, "\");\n"; @@ -422,22 +422,22 @@ function map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $pla Map_type.prototype.refresh = function() { this.button1.className = 'non_active'; - if(this.place_map.getCurrentMapType() != G_NORMAL_MAP) { + if (this.place_map.getCurrentMapType() != G_NORMAL_MAP) { this.button2.className = 'non_active'; } else { this.button2.className = 'active'; } - if(this.place_map.getCurrentMapType() != G_SATELLITE_MAP) { + if (this.place_map.getCurrentMapType() != G_SATELLITE_MAP) { this.button3.className = 'non_active'; } else { this.button3.className = 'active'; } - if(this.place_map.getCurrentMapType() != G_HYBRID_MAP) { + if (this.place_map.getCurrentMapType() != G_HYBRID_MAP) { this.button4.className = 'non_active'; } else { this.button4.className = 'active'; } - if(this.place_map.getCurrentMapType() != G_PHYSICAL_MAP) { + if (this.place_map.getCurrentMapType() != G_PHYSICAL_MAP) { this.button5.className = 'non_active'; } else { this.button5.className = 'active'; @@ -521,19 +521,19 @@ function map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $pla if (isset($levelo[0])) $levelo[0]=0; $numls = count($parent)-1; $levelo=check_were_am_i($numls, $levelm); - if ($numfound<2 && ($level==1 || !(isset($levelo[($level-1)])))){ + if ($numfound<2 && ($level==1 || !(isset($levelo[($level-1)])))) { echo "zoomlevel = place_map.getBoundsZoomLevel(bounds);\n"; echo " place_map.setCenter(new GLatLng(0, 0), zoomlevel+5);\n"; } - else if ($numfound<2 && !isset($levelo[($level-2)])){ + else if ($numfound<2 && !isset($levelo[($level-2)])) { echo "zoomlevel = place_map.getBoundsZoomLevel(bounds);\n"; echo " place_map.setCenter(new GLatLng(0, 0), zoomlevel+6);\n"; } - else if ($level==2){ + else if ($level==2) { echo "zoomlevel = place_map.getBoundsZoomLevel(bounds);\n"; echo " place_map.setCenter(new GLatLng(0, 0), zoomlevel+8);\n"; } - else if ($numfound<2 && $level>1){ + else if ($numfound<2 && $level>1) { echo "zoomlevel = place_map.getBoundsZoomLevel(bounds);\n"; echo " place_map.setCenter(new GLatLng(0, 0), zoomlevel+10);\n"; } @@ -595,7 +595,7 @@ function map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $pla print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $placelevels); } } - else if ($level>0){ //if unknown place display the upper level place + else if ($level>0) { //if unknown place display the upper level place $placelevels = ", ".i18n::translate('unknown').$placelevels; $linklevels .= "&parent[".$level."]="; $break = false; diff --git a/modules/googlemap/places.php b/modules/googlemap/places.php index 35034689c5..b7b1d6ab3c 100644 --- a/modules/googlemap/places.php +++ b/modules/googlemap/places.php @@ -266,7 +266,7 @@ if ($action=="ImportGedcom") { $parent=preg_split('/ *, */', $place["place"]); $parent=array_reverse($parent); $parent_id=0; - for($i=0; $i<count($parent); $i++) { + for ($i=0; $i<count($parent); $i++) { if (!isset($default_zoom_level[$i])) $default_zoom_level[$i]=$default_zoom_level[$i-1]; $escparent=$parent[$i]; @@ -326,7 +326,7 @@ if ($action=="ImportFile") { <td class="optionbox"> <select name="localfile"> <option></option> - <?php foreach($placefiles as $p=>$placefile) { ?> + <?php foreach ($placefiles as $p=>$placefile) { ?> <option value="<?php echo htmlspecialchars($placefile); ?>"><?php if (substr($placefile, 0, 1)=="/") echo substr($placefile, 1); else echo $placefile; ?></option> @@ -375,12 +375,12 @@ if ($action=="ImportFile2") { $placelist = array(); $j = 0; $maxLevel = 0; - foreach ($lines as $p => $placerec){ + foreach ($lines as $p => $placerec) { $fieldrec = explode(';', $placerec); - if($fieldrec[0] > $maxLevel) $maxLevel = $fieldrec[0]; + if ($fieldrec[0] > $maxLevel) $maxLevel = $fieldrec[0]; } $fields = count($fieldrec); - foreach ($lines as $p => $placerec){ + foreach ($lines as $p => $placerec) { $fieldrec = explode(';', $placerec); if (is_numeric($fieldrec[0]) && $fieldrec[0]<=$maxLevel) { $placelist[$j] = array(); @@ -441,7 +441,7 @@ if ($action=="ImportFile2") { $parent = explode(',', $place["place"]); $parent = array_reverse($parent); $parent_id=0; - for($i=0; $i<count($parent); $i++) { + for ($i=0; $i<count($parent); $i++) { $escparent=$parent[$i]; if ($escparent == "") { $escparent = "Unknown"; @@ -652,7 +652,7 @@ foreach ($placelist as $place) { echo i18n::translate('Export all locations to file'), "</a>"; echo help_link('PL_EXPORT_ALL_FILE','googlemap'); echo "</td></tr></table><br />"; -if(empty($SEARCH_SPIDER)) +if (empty($SEARCH_SPIDER)) print_footer(); else { echo i18n::translate('Search Engine Spider Detected'), ": ", $SEARCH_SPIDER; diff --git a/modules/googlemap/places_edit.php b/modules/googlemap/places_edit.php index be92f4c1fd..bc35dfa2b6 100644 --- a/modules/googlemap/places_edit.php +++ b/modules/googlemap/places_edit.php @@ -290,10 +290,10 @@ if ($action=="add") { longitude = longitude * -1; document.editplaces.NEW_PLACE_LONG.value = longitude; } - if(document.editplaces.LATI_CONTROL.value == "PL_S") { + if (document.editplaces.LATI_CONTROL.value == "PL_S") { latitude = latitude * -1; } - if(document.editplaces.LONG_CONTROL.value == "PL_W") { + if (document.editplaces.LONG_CONTROL.value == "PL_W") { longitude = longitude * -1; } @@ -336,19 +336,19 @@ if ($action=="add") { Map_type.prototype.refresh = function() { - if(this.map.getCurrentMapType() != G_NORMAL_MAP) + if (this.map.getCurrentMapType() != G_NORMAL_MAP) this.button1.className = 'non_active'; else this.button1.className = 'active'; - if(this.map.getCurrentMapType() != G_SATELLITE_MAP) + if (this.map.getCurrentMapType() != G_SATELLITE_MAP) this.button2.className = 'non_active'; else this.button2.className = 'active'; - if(this.map.getCurrentMapType() != G_HYBRID_MAP) + if (this.map.getCurrentMapType() != G_HYBRID_MAP) this.button3.className = 'non_active'; else this.button3.className = 'active'; - if(this.map.getCurrentMapType() != G_PHYSICAL_MAP) + if (this.map.getCurrentMapType() != G_PHYSICAL_MAP) this.button4.className = 'non_active'; else this.button4.className = 'active'; @@ -478,9 +478,9 @@ if ($action=="add") { GEvent.addListener(map, "moveend", function() { document.editplaces.NEW_ZOOM_FACTOR.value = map.getZoom(); }); -<?php if(($place_long == null) || ($place_lati == null)) { ?> +<?php if (($place_long == null) || ($place_lati == null)) { ?> map.setCenter(new GLatLng( <?php echo $parent_lati, ", ", $parent_long, "), ", $zoomfactor; ?>, G_NORMAL_MAP ); -<?php }else { ?> +<?php } else { ?> map.setCenter(new GLatLng( <?php echo $place_lati, ", ", $place_long, "), ", $zoomfactor; ?>, G_NORMAL_MAP ); <?php } ?> @@ -623,7 +623,7 @@ if ($action=="add") { if (!response || response.Status.code != 200) { alert("<?php echo i18n::translate('No places found'); ?>"); } else { - if(response.Placemark.length>0) { + if (response.Placemark.length>0) { for (i=0;i<response.Placemark.length;i++) { place = response.Placemark[i]; point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); @@ -719,17 +719,17 @@ if ($action=="add") { } ?> <td class="optionbox"> - <input type="radio" id="new_prec_0" name="NEW_PRECISION" onchange="updateMap();" <?php if($precision==$GOOGLEMAP_PRECISION_0) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_0; ?>" /> + <input type="radio" id="new_prec_0" name="NEW_PRECISION" onchange="updateMap();" <?php if ($precision==$GOOGLEMAP_PRECISION_0) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_0; ?>" /> <label for="new_prec_0"><?php echo i18n::translate('Country'); ?></label> - <input type="radio" id="new_prec_1" name="NEW_PRECISION" onchange="updateMap();" <?php if($precision==$GOOGLEMAP_PRECISION_1) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_1; ?>" /> + <input type="radio" id="new_prec_1" name="NEW_PRECISION" onchange="updateMap();" <?php if ($precision==$GOOGLEMAP_PRECISION_1) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_1; ?>" /> <label for="new_prec_1"><?php echo i18n::translate('State'); ?></label> - <input type="radio" id="new_prec_2" name="NEW_PRECISION" onchange="updateMap();" <?php if($precision==$GOOGLEMAP_PRECISION_2) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_2; ?>" /> + <input type="radio" id="new_prec_2" name="NEW_PRECISION" onchange="updateMap();" <?php if ($precision==$GOOGLEMAP_PRECISION_2) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_2; ?>" /> <label for="new_prec_2"><?php echo i18n::translate('City'); ?></label> - <input type="radio" id="new_prec_3" name="NEW_PRECISION" onchange="updateMap();" <?php if($precision==$GOOGLEMAP_PRECISION_3) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_3; ?>" /> + <input type="radio" id="new_prec_3" name="NEW_PRECISION" onchange="updateMap();" <?php if ($precision==$GOOGLEMAP_PRECISION_3) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_3; ?>" /> <label for="new_prec_3"><?php echo i18n::translate('Neighborhood'); ?></label> - <input type="radio" id="new_prec_4" name="NEW_PRECISION" onchange="updateMap();"<?php if($precision==$GOOGLEMAP_PRECISION_4) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_4; ?>" /> + <input type="radio" id="new_prec_4" name="NEW_PRECISION" onchange="updateMap();"<?php if ($precision==$GOOGLEMAP_PRECISION_4) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_4; ?>" /> <label for="new_prec_4"><?php echo i18n::translate('House'); ?></label> - <input type="radio" id="new_prec_5" name="NEW_PRECISION" onchange="updateMap();"<?php if($precision>$GOOGLEMAP_PRECISION_4) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_5; ?>" /> + <input type="radio" id="new_prec_5" name="NEW_PRECISION" onchange="updateMap();"<?php if ($precision>$GOOGLEMAP_PRECISION_4) echo "checked=\"checked\""; ?> value="<?php echo $GOOGLEMAP_PRECISION_5; ?>" /> <label for="new_prec_5"><?php echo i18n::translate('Max'); ?></label> </td> </tr> diff --git a/modules/googlemap/wt_googlemap.js b/modules/googlemap/wt_googlemap.js index e1baf28dba..ea6bac0ac6 100644 --- a/modules/googlemap/wt_googlemap.js +++ b/modules/googlemap/wt_googlemap.js @@ -53,7 +53,7 @@ clat = (Boundaries.getNorthEast().lat() + Boundaries.getSouthWest().lat())/2; clng = (Boundaries.getNorthEast().lng() + Boundaries.getSouthWest().lng())/2; zoomlevel = map.getBoundsZoomLevel(Boundaries); - for(i = 0; ((i < 10) && (zoomlevel == 1)); i++) { + for (i = 0; ((i < 10) && (zoomlevel == 1)); i++) { zoomlevel = map.getBoundsZoomLevel(Boundaries); } zoomlevel = zoomlevel-1; @@ -98,4 +98,4 @@ ResizeMap(); // Our info window content } - }
\ No newline at end of file + } |
