Changeset 7398 for extensions/GMaps


Ignore:
Timestamp:
10/26/10 10:44:28 (9 years ago)
Author:
grum
Message:

Fix bugs on install/update process

Location:
extensions/GMaps
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/admin/plugin_admin.php

    r7054 r7398  
    1414if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 
    1515 
    16 include(GMAPS_PATH."gmaps_aip.class.inc.php"); 
     16 
    1717 
    1818global $prefixeTable, $template; 
     
    2323 
    2424 
    25 $plugin_aip = new GMaps_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 
     25if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED)) 
     26{ 
     27  $config=Array(); 
     28  GPCCore::loadConfig('gmaps', $config); 
     29 
     30 
     31  if($config['installed']!=GMAPS_VERSION2) 
     32  { 
     33    /* the plugin was updated without being deactivated 
     34     * deactivate + activate the plugin to process the database upgrade 
     35     */ 
     36    include(GMAPS_PATH."gmaps_install.class.inc.php"); 
     37    $gmaps=new GMaps_Install($prefixeTable, dirname(__FILE__)); 
     38    $gmaps->deactivate(); 
     39    $gmaps->activate(); 
     40    $template->delete_compiled_templates(); 
     41    //$config['newInstall']='n'; 
     42  } 
     43 
     44  include(GMAPS_PATH."gmaps_aip.class.inc.php"); 
     45  $plugin_aip = new GMaps_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 
     46} 
     47else 
     48{ 
     49  /* 
     50   * plugin was upgraded, but GPC was not 
     51   * display a page to inform user to upgrade GPC 
     52   */ 
     53  include(GMAPS_PATH."gmaps_aip_release.class.inc.php"); 
     54  $plugin_aip = new GMaps_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation()); 
     55} 
     56 
     57 
     58 
     59 
    2660$plugin_aip->manage(); 
    2761 
  • extensions/GMaps/language/en_UK/plugin.lang.php

    r7309 r7398  
    22 
    33$lang['To install this plugin, you need to install Grum Plugin Classes %s before']="To install this plugin, you first need to install plugin Grum Plugin Classes %s"; 
    4 $lang['To install this plugin, you need to install Advanced Metadata %s before']="To install this plugin, you first need to install plugin Advanced Metadata %s"; 
     4$lang['To install this plugin, you need to install Advanced Metadata %s before']="To install this plugin, you first need to install, activate et configure plugin Advanced Metadata %s"; 
    55$lang['gmaps_amd_warning_inactive']="Warning ! <br><br>Plugin Advanced Metadata %s does not appear to be installed/activated: maps can't be displayed until it is installed and activated."; 
    66$lang['gmaps_amd_warning_basic']="Warning! <br><br> Plugin Advanced Metadata operates in 'basic' mode: maps linked to the categories can't be displayed with this mode."; 
     
    162162$lang['gmaps_apply_zoomLevel_max']="Apply a maximum zoom level"; 
    163163$lang['gmaps_display_type_cannot_be_changed']="This map is currently associated, the display type can't be modified"; 
    164  
     164$lang['gmaps_gpc_not_up_to_date']="It is necessary for the plugin that the <i>Grum Plugin Classes</i> version %s is installed. 
     165Currently, version %s is installed: please proceed with the update version of the plugin <i>Grum Plugin Classes</i>."; 
    165166 
    166167?> 
  • extensions/GMaps/language/fr_FR/plugin.lang.php

    r7309 r7398  
    22 
    33$lang['To install this plugin, you need to install Grum Plugin Classes %s before']="Pour installer ce plugin, vous devez au préalable installer le plugin Grum Plugin Classes %s"; 
    4 $lang['To install this plugin, you need to install Advanced Metadata %s before']="Pour installer ce plugin, vous devez au préalable installer le plugin Advanced Metadata %s"; 
     4$lang['To install this plugin, you need to install Advanced Metadata %s before']="Pour installer ce plugin, vous devez au préalable installer, activer et configurer le plugin Advanced Metadata %s"; 
    55$lang['gmaps_amd_warning_inactive']="Attention ! <br><br>Le plugin Advanced Metadata %s ne semble pas être installé/activé : les cartes ne pourront être affichées tant qu'il ne sera pas activé."; 
    66$lang['gmaps_amd_warning_basic']="Attention ! <br><br>Le plugin Advanced Metadata fonctionne en mode 'basique' : les cartes associées aux catégories ne pourront pas être affichées."; 
     
    173173$lang['gmaps_apply_zoomLevel_max']="Appliquer un niveau de zoom maximum"; 
    174174$lang['gmaps_display_type_cannot_be_changed']="Cette carte faisant l'objet d'associations, la méthode d'affichage ne peut être modifiée"; 
    175  
     175$lang['gmaps_gpc_not_up_to_date']="Il est nécessaire que le plugin <i>Grum Plugin Classes</i> version %s soit installé. 
     176Actuellement, la version %s est installée : merci de procéder à la mise à jour de version du plugin <i>Grum Plugin Classes</i>."; 
    176177?> 
  • extensions/GMaps/maintain.inc.php

    r7177 r7398  
    3232{ 
    3333  @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 
    34   // need GPC release greater or equal than 3.2.0 
     34  // need GPC release greater or equal than ... 
    3535  if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED)) 
    3636  { 
Note: See TracChangeset for help on using the changeset viewer.