Changeset 19446 for extensions/SmartAlbums/include/install.inc.php
- Timestamp:
- Dec 16, 2012, 3:21:10 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/include/install.inc.php
r17716 r19446 11 11 $smart_default_config = serialize(array( 12 12 'update_on_upload' => false, 13 'update_on_date' => true, 14 'update_timeout' => 3, 13 15 'show_list_messages' => true, 14 16 'smart_is_forbidden' => true, 17 'last_update' => 0, 15 18 )); 16 19 … … 25 28 { 26 29 $new_conf['smart_is_forbidden'] = true; 27 conf_update_param('SmartAlbums', serialize($new_conf));28 $conf['SmartAlbums'] = serialize($new_conf);29 30 } 31 // new params in 2.1.0 32 if (!isset($new_conf['update_on_date'])) 33 { 34 $new_conf['update_on_date'] = true; 35 $new_conf['update_timeout'] = 3; 36 $new_conf['last_update'] = 0; 37 } 38 conf_update_param('SmartAlbums', serialize($new_conf)); 39 $conf['SmartAlbums'] = serialize($new_conf); 30 40 } 31 41 … … 45 55 { 46 56 pwg_query('ALTER TABLE `' . IMAGE_CATEGORY_TABLE . '` ADD `smart` ENUM(\'true\', \'false\') NOT NULL DEFAULT \'false\';'); 57 } 58 59 // new column on category table 60 $result = pwg_query('SHOW COLUMNS FROM `' . CATEGORIES_TABLE . '` LIKE "smart_update";'); 61 if (!pwg_db_num_rows($result)) 62 { 63 pwg_query('ALTER TABLE `' . CATEGORIES_TABLE . '` ADD `smart_update` DATETIME NOT NULL;'); 47 64 } 48 65 … … 68 85 foreach ($name_changes as $old => $new) 69 86 { 70 pwg_query('UPDATE `' . $prefixeTable . 'category_filters` SET cond = "'.$new.'" WHERE cond = "'.$old.'";');87 pwg_query('UPDATE `' . $prefixeTable . 'category_filters` SET cond = "'.$new.'" WHERE type = "date" AND cond = "'.$old.'";'); 71 88 } 72 89 }
Note: See TracChangeset
for help on using the changeset viewer.