Changeset 33008 for extensions/see_photos_by_user/maintain.class.php
- Timestamp:
- Jan 21, 2024, 12:39:07 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_photos_by_user/maintain.class.php
r32937 r33008 59 59 conf_update_param('see_photos_by_user_shape', 'sphere',true); 60 60 } 61 61 62 pwg_query('UPDATE '.HISTORY_TABLE.' SET section = \'user-\' WHERE section like \'user-%\''); 63 $history_sections = get_enums(HISTORY_TABLE, 'section'); 64 foreach ($history_sections as $key => $value) { 65 if (substr($value,0,5) == 'user-') { 66 unset($history_sections[$key]); 67 } 68 } 69 $history_sections[]='user-'; 70 pwg_query('ALTER TABLE '.HISTORY_TABLE.' CHANGE section section enum(\''.implode("','", array_unique($history_sections)).'\') DEFAULT NULL;'); 71 conf_update_param('history_sections_cache', get_enums(HISTORY_TABLE, 'section'), true); 72 62 73 } 63 74 … … 86 97 conf_update_param('see_photos_by_user_shape', 'sphere',true); 87 98 } 99 100 pwg_query('UPDATE '.HISTORY_TABLE.' SET section = \'user-\' WHERE section like \'user-%\''); 101 $history_sections = get_enums(HISTORY_TABLE, 'section'); 102 foreach ($history_sections as $key => $value) { 103 if (substr($value,0,5) == 'user-') { 104 unset($history_sections[$key]); 105 } 106 } 107 $history_sections[]='user-'; 108 pwg_query('ALTER TABLE '.HISTORY_TABLE.' CHANGE section section enum(\''.implode("','", array_unique($history_sections)).'\') DEFAULT NULL;'); 109 conf_update_param('history_sections_cache', get_enums(HISTORY_TABLE, 'section'), true); 110 88 111 } 89 112
Note: See TracChangeset
for help on using the changeset viewer.