Changeset 7560 for extensions/lmt/lmt_install.class.inc.php
- Timestamp:
- Nov 1, 2010, 10:51:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lmt/lmt_install.class.inc.php
r5548 r7560 28 28 parent::__construct($prefixeTable, $filelocation); 29 29 $this->tablef= new GPCTables($this->tables); 30 $this->exportfile=dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().'.sql';31 30 } 32 31 … … 71 70 ); 72 71 73 //if present, try to import backup 74 //if backup file 75 $import=$this->tablef->import($this->exportfile); 76 if($import['errors']<0) 77 { 78 $result=$this->tablef->create($tables_def); 79 return($result); 80 } 81 else 82 { 83 return(true); 84 } 72 $result=$this->tablef->create($tables_def); 73 GPCCore::register($this->getPluginName(), LMT_VERSION, LMT_GPC_NEEDED); 74 75 return($result); 85 76 } 86 87 77 88 78 /* … … 91 81 public function uninstall() 92 82 { 93 $this->tablef->export($this->exportfile);94 83 $this->deleteConfig(); 95 84 $this->tablef->drop(); 85 GPCCore::unregister($this->getPluginName()); 96 86 return(''); 97 87 } … … 105 95 $this->config['installed']=LMT_VERSION2; 106 96 $this->saveConfig(); 97 98 GPCCore::register($this->getPluginName(), LMT_VERSION, LMT_GPC_NEEDED); 99 GPCRequestBuilder::register($this->getPluginName(), dirname($this->getFileLocation()).'/lmt_rb_callback.class.inc.php'); 107 100 return(''); 108 101 } … … 110 103 public function deactivate() 111 104 { 105 GPCRequestBuilder::unregister($this->getPluginName()); 112 106 } 113 114 107 } //class 115 108
Note: See TracChangeset
for help on using the changeset viewer.