Changeset 25359


Ignore:
Timestamp:
Nov 6, 2013, 6:56:14 PM (7 years ago)
Author:
cljosse
Message:

[extensions] edit_gmaps corrections bugs

Location:
extensions/edit_gmaps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/edit_gmaps/edit_gmaps.inc.php

    r24288 r25359  
    4444    $columns_of = array();
    4545    $query = 'DESC '.$table.';';
    46     $result = pwg_db_fetch_assoc($query);       
     46
    4747    $columns_of[$table] = array();   
    48 
     48     $result=pwg_query($query);
    4949    if ($result)   
    50         while ($row = pwg_db_fetch_row($result))
     50        while ($row = pwg_db_fetch_row($result)){     
    5151            array_push($columns_of[$table], $row[0]);
    52        
     52        }
    5353    return $columns_of;
    5454  }
     
    288288  global $EDIT_CL_parametres;
    289289//=============================================================================
     290 
    290291$my_para=$EDIT_CL_parametres;
     292 if (empty($my_para)) $my_para= (object) '';
    291293$lon= isset($my_para->lon)? $my_para->lon:'' ;
    292294$lat= isset($my_para->lat)? $my_para->lat:'' ;
  • extensions/edit_gmaps/maintain.inc.php

    r20034 r25359  
    1111global $conf,$lang ;
    1212
    13    if (!isset($conf['gmaps_api_key']))
    14 
    15 $msg = sprintf(l10n('To install this plugin, you need to install %s before'),"RV Maps&Earth" );
    16   if(is_array($errors))
    17   {    array_push($errors,  "CANNOT INSTALL - $plugin_id <BR />".$msg);  }
    18   else  {    $errors=Array( "CANNOT INSTALL - $plugin_id <BR />".$msg);  }
    19    return  ;
    20 }
    21  $colonnes=cl_edit_functions::Get_columns_of(IMAGES_TABLE);
    22 
    2313 $colonnes=cl_edit_functions::Get_columns_of(IMAGES_TABLE);
    2414 $key = array_search('alt', $colonnes[IMAGES_TABLE]);
    2515if (!$key){
    2616 $q = 'ALTER TABLE '.IMAGES_TABLE.' ADD COLUMN `alt` DOUBLE(9,6)';
     17    pwg_query($q);     
     18    }
     19    $key = array_search('lon', $colonnes[IMAGES_TABLE]);
     20if (!$key){
     21 $q = 'ALTER TABLE '.IMAGES_TABLE.' ADD COLUMN `lon` DOUBLE(9,6)';
     22    pwg_query($q);     
     23    }
     24    $key = array_search('lat', $colonnes[IMAGES_TABLE]);
     25if (!$key){
     26 $q = 'ALTER TABLE '.IMAGES_TABLE.' ADD COLUMN `lat` DOUBLE(9,6)';
    2727    pwg_query($q);     
    2828    }
Note: See TracChangeset for help on using the changeset viewer.