Changeset 27330 for extensions/physical2virtual/maintain.inc.php
- Timestamp:
- Feb 11, 2014, 1:25:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/physical2virtual/maintain.inc.php
r27229 r27330 27 27 function __construct($plugin_id) 28 28 { 29 global $prefixeTable; 30 29 31 parent::__construct($plugin_id); 32 33 $this->table = $prefixeTable . 'phy2virt_categories'; 30 34 } 31 35 32 36 function install($plugin_version, &$errors=array()) 33 37 { 34 global $conf ;38 global $conf, $prefixeTable; 35 39 36 40 if (empty($conf['physical2virtual'])) … … 47 51 } 48 52 53 // new table 54 pwg_query( 55 'CREATE TABLE IF NOT EXISTS `' . $this->table . '` ( 56 `phy_category_id` smallint(5) unsigned NOT NULL, 57 `virt_category_id` smallint(5) unsigned NOT NULL, 58 `updated` DATETIME NOT NULL DEFAULT "1970-01-01 00:00:00", 59 KEY `phy_category_id` (`phy_category_id`) 60 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 61 ;'); 62 49 63 $this->installed = true; 50 64 } … … 65 79 { 66 80 conf_delete_param('physical2virtual'); 81 82 pwg_query('DROP TABLE `' . $this->table . '`;'); 67 83 } 68 84 }
Note: See TracChangeset
for help on using the changeset viewer.