Changeset 5935 for extensions/AMetaData/amd_install.class.inc.php
- Timestamp:
- Apr 21, 2010, 9:27:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/amd_install.class.inc.php
r5790 r5935 30 30 { 31 31 parent::__construct($prefixeTable, $filelocation); 32 $this->tablef= new manage_tables($this->tables);32 $this->tablef= new GPCTables($this->tables); 33 33 } 34 34 … … 46 46 { 47 47 global $user, $lang; 48 49 $this->initConfig(); 50 $this->loadConfig(); 51 $this->config['installed']=AMD_VERSION2; 52 $this->saveConfig(); 48 53 49 54 $tables_def=array( … … 90 95 //$table_def array 91 96 $tables_def = create_table_add_character_set($tables_def); 92 $result=$this->tablef->create _tables($tables_def);97 $result=$this->tablef->create($tables_def); 93 98 unset($tables_def); 94 99 … … 121 126 public function uninstall() 122 127 { 123 $this->delete _config();124 $this->tablef->drop _tables();128 $this->deleteConfig(); 129 $this->tablef->drop(); 125 130 } 126 131 … … 142 147 foreach(AMD_JpegMetaData::getTagList(Array('filter' => AMD_JpegMetaData::TAGFILTER_IMPLEMENTED, 'xmp' => true, 'maker' => true, 'iptc' => true)) as $key => $val) 143 148 { 144 $sql="INSERT INTO ".$this->tables['used_tags']." VALUES('', '".$key."', '".(($val['translatable'])?'y':'n')."', '".$val['name']."', 0, '". L10n::get($val['name'])."');";149 $sql="INSERT INTO ".$this->tables['used_tags']." VALUES('', '".$key."', '".(($val['translatable'])?'y':'n')."', '".$val['name']."', 0, '".addslashes(L10n::get($val['name']))."');"; 145 150 pwg_query($sql); 146 151 } … … 154 159 LEFT JOIN ".IMAGES_TABLE." ti ON ti.id = tc.element_id 155 160 WHERE tc.user_id = ".$user['id']." 161 AND ti.id IS NOT NULL 156 162 ORDER BY RAND() LIMIT 25;"; 157 163 $result=pwg_query($sql); … … 207 213 } 208 214 209 $this->init_config(); 210 $this->load_config(); 211 $this->save_config(); 215 $this->initConfig(); 216 $this->loadConfig(); 217 $this->config['installed']=AMD_VERSION2; //update the installed release number 218 $this->saveConfig(); 212 219 } 213 220
Note: See TracChangeset
for help on using the changeset viewer.