Ignore:
Timestamp:
Oct 13, 2010, 10:08:41 PM (14 years ago)
Author:
grum
Message:

Fix bugs on install process ; add street view control management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/gmaps_ajax.php

    r7147 r7177  
    143143                 isset($_REQUEST['datas']['navigationControl']) &&
    144144                 isset($_REQUEST['datas']['scaleControl']) &&
     145                 isset($_REQUEST['datas']['streetViewControl']) &&
    145146                 isset($_REQUEST['datas']['style'])))
    146147            {
     
    183184              if(!($_REQUEST['datas']['scaleControl']=='y' or
    184185                   $_REQUEST['datas']['scaleControl']=='n')) $_REQUEST['datas']['scaleControl']='y';
     186
     187              if(!($_REQUEST['datas']['streetViewControl']=='y' or
     188                   $_REQUEST['datas']['streetViewControl']=='n')) $_REQUEST['datas']['streetViewControl']='n';
    185189            }
    186190          }
     
    374378      $datas=Array();
    375379
    376       $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl
     380      $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl
    377381            FROM ".$this->tables['maps']."
    378382            ORDER BY displayType ASC, name ASC";
     
    402406          $row['navigationControl']=l10n('gmaps_googleMapNavigationControl_'.$row['navigationControl']);
    403407          $row['scaleControl']=($row['scaleControl']=='y')?l10n('gmaps_display_visible'):l10n('gmaps_display_hidden');
     408          $row['streetViewControl']=($row['streetViewControl']=='y')?l10n('gmaps_display_visible'):l10n('gmaps_display_hidden');
    404409          $datas[]=$row;
    405410        }
     
    437442                $properties['navigationControl']."', '".
    438443                $properties['scaleControl']."', '".
     444                $properties['streetViewControl']."', '".
    439445                mysql_escape_string($properties['style'])."');";
    440446        $result=pwg_query($sql);
     
    447453                $properties['displayType']."', sizeMode='".
    448454                $properties['sizeMode']."', width='".
    449                 $properties['mapId']."', width='".
    450455                $properties['width']."', height='".
    451456                $properties['height']."', zoomLevel='".
     
    454459                $properties['mapTypeControl']."', navigationControl='".
    455460                $properties['navigationControl']."', scaleControl='".
    456                 $properties['scaleControl']."', style='".
     461                $properties['scaleControl']."', streetViewControl='".
     462                $properties['streetViewControl']."', style='".
    457463                mysql_escape_string($properties['style'])."'
    458464              WHERE id='$id';";
     
    483489        'mapTypeControl' => 0,
    484490        'navigationControl' => 0,
    485         'scaleControl' => 'y'
     491        'scaleControl' => 'y',
     492        'streetViewControl' => 'n'
    486493      );
    487494
    488       $sql="SELECT id, displayType, sizeMode, name, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl
     495      $sql="SELECT id, displayType, sizeMode, name, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl
    489496            FROM ".$this->tables['maps']."
    490497            WHERE id='$id';";
     
    10061013      global $prefixeTable, $template, $user, $conf;
    10071014
    1008       $returned='';
     1015      $requestId='';
    10091016
    10101017      $this->buildMapList($category, 'C');
Note: See TracChangeset for help on using the changeset viewer.