Show
Ignore:
Timestamp:
03/04/10 22:35:22 (3 years ago)
Author:
grum
Message:

Install process make a default config (select metadata, add a predefined group, set default values for filters)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/amd_install.class.inc.php

    r4931 r5040  
    3939    public function install() 
    4040    { 
     41      global $user, $lang; 
     42 
    4143      $tables_def=array( 
    4244"CREATE TABLE `".$this->tables['used_tags']."` ( 
     
    8284      $tables_def = create_table_add_character_set($tables_def); 
    8385      $result=$this->tablef->create_tables($tables_def); 
     86      unset($tables_def); 
     87 
     88      $tables_insert=array( 
     89"INSERT INTO `".$this->tables['groups']."` VALUES(1, 0)", 
     90"INSERT INTO `".$this->tables['groups_names']."` VALUES(1, '".$user['language']."', '".$lang['g003_default_group_name']."')", 
     91"INSERT INTO `".$this->tables['selected_tags']."` VALUES 
     92    ('magic.Camera.Make', 0, 1), 
     93    ('magic.Camera.Model', 1, 1), 
     94    ('magic.ShotInfo.Lens', 2, 1), 
     95    ('magic.ShotInfo.Aperture', 3, 1), 
     96    ('magic.ShotInfo.Exposure', 4, 1), 
     97    ('magic.ShotInfo.ISO', 5, 1), 
     98    ('magic.ShotInfo.FocalLength', 6, 1), 
     99    ('magic.ShotInfo.FocalLengthIn35mm', 7, 1), 
     100    ('magic.ShotInfo.Flash.Fired', 8, 1)" 
     101      ); 
     102      foreach($tables_insert as $sql) 
     103      { 
     104        pwg_query($sql); 
     105      } 
    84106 
    85107      return($result);