Changeset 23085 for extensions/community/maintain.inc.php
- Timestamp:
- Jun 7, 2013, 2:41:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/maintain.inc.php
r23037 r23085 24 24 $query = 'DROP TABLE '.$prefixeTable.'community_pendings;'; 25 25 pwg_query($query); 26 27 $query = 'ALTER TABLE '.$prefixeTable.'categories drop column community_user;'; 28 pwg_query($query); 29 30 // delete configuration 31 pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param IN ("community", "community_cache_key");'); 26 32 } 27 33 … … 241 247 { 242 248 global $prefixeTable; 243 244 // create an album "Community" 245 $category_info = create_virtual_category('Community'); 249 250 // is there a "Community" album? 251 $query = ' 252 SELECT 253 id 254 FROM '.CATEGORIES_TABLE.' 255 WHERE name = \'Community\' 256 ;'; 257 $result = pwg_query($query); 258 while ($row = pwg_db_fetch_assoc($result)) 259 { 260 $category_id = $row['id']; 261 break; 262 } 263 264 if (!isset($category_id)) 265 { 266 // create an album "Community" 267 $category_info = create_virtual_category('Community'); 268 $category_id = $category_info['id']; 269 } 246 270 247 271 $insert = array( 248 272 'type' => 'any_registered_user', 249 'category_id' => $category_i nfo['id'],273 'category_id' => $category_id, 250 274 'recursive' => 'true', 251 275 'create_subcategories' => 'true',
Note: See TracChangeset
for help on using the changeset viewer.