Changeset 15995 for extensions/Comments_on_Albums/maintain.inc.php
- Timestamp:
- Jun 24, 2012, 1:49:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/maintain.inc.php
r14528 r15995 13 13 `author` varchar(255) DEFAULT NULL, 14 14 `author_id` smallint(5) DEFAULT NULL, 15 `anonymous_id` varchar(45) NOT NULL, 15 16 `content` longtext, 16 17 `validated` enum('true','false') NOT NULL DEFAULT 'false', … … 23 24 function plugin_activate() 24 25 { 25 global $conf ;26 global $conf, $prefixeTable; 26 27 27 28 if (isset($conf['comments_on_albums'])) 28 29 { 29 30 pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="comments_on_albums" LIMIT 1;'); 31 } 32 33 $query = 'SHOW COLUMNS FROM `' . $prefixeTable . 'comments_categories`;'; 34 $columns = hash_from_query($query, 'Field'); 35 if (!isset($columns['anonymous_id'])) 36 { 37 pwg_query('ALTER TABLE `' . $prefixeTable . 'comments_categories` ADD `anonymous_id` VARCHAR( 45 ) DEFAULT NULL;'); 30 38 } 31 39 }
Note: See TracChangeset
for help on using the changeset viewer.