Changeset 248 for trunk


Ignore:
Timestamp:
07/03/2011 11:06:23 PM (11 months ago)
Author:
sque
Message:

Fix: Google Map didn't work with no authentication key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals/functions.php

    r247 r248  
    352352                 
    353353                $gmap_key = $key; 
    354         }        
     354        } 
     355        $script_params = array( 
     356                'file' => 'api', 
     357                'v' => $vars['gmap']['api'], 
     358                'hl=' => $lang["iso639"] 
     359        ); 
     360        if ($gmap_key !== false) 
     361                $script_params['key'] = $gmap_key; 
    355362        $main->html->head->add_script("text/javascript", 
    356363                htmlspecialchars("http://{$vars['gmap']['server']}/maps?" . 
    357                         http_build_query(array( 
    358                                 'file' => 'api', 
    359                                 'v' => $vars['gmap']['api'], 
    360                                 'key' => $gmap_key, 
    361                                 'hl=' => $lang["iso639"]) 
    362                         ) 
     364                        http_build_query($script_params) 
    363365                ) 
    364366        ); 
Note: See TracChangeset for help on using the changeset viewer.