Changeset 7386


Ignore:
Timestamp:
10/25/10 11:33:19 (9 years ago)
Author:
grum
Message:

Fix bugs on the install/update process

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/gmaps_install.class.inc.php

    r7308 r7386  
    1717   include_once('gmaps_root.class.inc.php'); 
    1818   include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTables.class.inc.php'); 
     19   include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php'); 
    1920 
    2021  /* GMaps class for install process */ 
     
    121122    public function uninstall() 
    122123    { 
     124      GPCCore::rmDir(dirname(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY)); 
    123125      $this->deleteConfig(); 
    124126      $this->tablef->drop(); 
     
    167169    private function updateFrom_010000() 
    168170    { 
    169       mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true); 
     171      if(!file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY)) 
     172          mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true); 
    170173 
    171174      $directory=scandir(GMAPS_PATH.'kml/'); 
     
    179182      } 
    180183 
    181       mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY); 
    182  
     184      GPCCore::rmDir(GMAPS_PATH.'kml'); 
    183185 
    184186      $tablesUpdate=array( 
    185         $this->tables['images_tags'] => array( 
     187        $this->tables['maps'] => array( 
    186188          'zoomLevelMaxActivated' => " ADD COLUMN `zoomLevelMaxActivated` CHAR(1)  NOT NULL DEFAULT 'n' AFTER `style` ", 
    187189        ) 
Note: See TracChangeset for help on using the changeset viewer.