Changeset 2845

Show
Ignore:
Timestamp:
01/08/12 08:54:01 (4 months ago)
Author:
paparazzia
Message:

fix #635

Location:
trunk/site
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/site/map.img.php

    r2698 r2845  
    3737 
    3838    $maptype = htmlentities(get_cgi_var('maptype', 'compas')); 
    39     if ( in_array($maptype, Array("floatingcompas", "bothcompass", "compas" ) ) ) { 
     39    if ( in_array($maptype, Array("floatingcompas", "bothcompass", "compas", "none" ) ) ) { 
    4040        setUserPref($boat, "mapTools" , $maptype, $save); 
    4141    } else { 
    42         setUserPref($boat, "mapTools" , "none", $save); 
     42        setUserPref($boat, "mapTools" , "compas", $save); 
    4343    } 
    4444    $list= htmlentities($_GET['list']) ; 
     
    172172 
    173173      $maplayers=htmlentities($_GET['maplayers']); 
    174       if ( $maplayers == "" ) $maplayers = "merged"; 
     174      if ( $maplayers == "" ) $maplayers = "multi"; 
    175175      setUserPref($boat, "mapLayers" , $maplayers, $save); 
    176176 
  • trunk/site/myboat.php

    r2603 r2845  
    8383    } 
    8484 
    85     // Retrive user_prefs 
     85    // Retrieve user_prefs 
    8686    $mapOpponents = $usersObj->getMyPref("mapOpponents"); 
    8787    if ( $mapOpponents == "NULL" ) $mapOpponents="myboat"; 
     88 
    8889    $mapTools = $usersObj->getMyPref("mapTools"); 
    89     if ( $mapTools == "NULL" ) $mapTools="compas"; 
     90    if ( !in_array($mapTools, Array("floatingcompas", "bothcompass", "compas", "none" )) ) $mapTools = "compas"; 
     91 
    9092    $mapCenter = $usersObj->getMyPref("mapCenter"); 
    91     if ( $mapCenter == "NULL" ) $mapCenter="myboat"; 
     93    if ( !in_array($mapCenter, Array("myboat", "mywp", "roadtowp")) ) $mapCenter = "myboat"; 
     94 
    9295    $mapArea = $usersObj->getMyPref("maparea"); 
    9396    if ( $mapArea == "NULL" ) $mapArea=10; 
    9497    $mapAge = $usersObj->getMyPref("mapAge"); 
    9598    if ( $mapAge == "NULL" ) $mapAge=3; 
     99 
    96100    $mapLayers = $usersObj->getMyPref("mapLayers"); 
    97     if ( $mapLayers == "NULL" ) $mapLayers="merged"; 
     101    if ( !in_array($mapLayers, Array("multi", "merged")) ) $mapLayers = "multi"; 
     102     
    98103    $mapMaille = $usersObj->getMyPref("mapMaille"); 
    99104    if ( $mapMaille == "NULL" ) $mapMaille=3; 
     
    101106    if ( $mapEstime == "NULL" ) $mapEstime=50; 
    102107    $mapX = $usersObj->getMyPref("mapX"); 
    103     if ( $mapX == "NULL" ) $mapX = 800; 
     108    if ( $mapX == "NULL" ) $mapX = 1024; 
    104109    $mapY = $usersObj->getMyPref("mapY"); 
    105     if ( $mapY == "NULL" ) $mapY = 600; 
     110    if ( $mapY == "NULL" ) $mapY = 768; 
    106111    $mapDrawtextwp = $usersObj->getMyPref("mapDrawtextwp"); 
    107112    if ( $mapDrawtextwp == "NULL" ) $mapDrawtextwp = "on";