Changeset 9566 for extensions/community
- Timestamp:
- Mar 7, 2011, 8:37:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/maintain.inc.php
r9539 r9566 106 106 function plugin_activate() 107 107 { 108 global $prefixeTable; 109 108 110 community_get_data_from_core21(); 109 111 community_get_data_from_community21(); 112 113 $query = ' 114 SELECT 115 COUNT(*) 116 FROM '.$prefixeTable.'community_permissions 117 ;'; 118 list($counter) = pwg_db_fetch_row(pwg_query($query)); 119 if (0 == $counter) 120 { 121 community_create_default_permission(); 122 } 110 123 } 111 124 … … 297 310 } 298 311 } 312 313 function community_create_default_permission() 314 { 315 global $prefixeTable; 316 317 // create an album "Community" 318 $category_info = create_virtual_category('Community'); 319 320 $insert = array( 321 'type' => 'any_registered_user', 322 'category_id' => $category_info['id'], 323 'recursive' => 'true', 324 'create_subcategories' => 'true', 325 'moderated' => 'true', 326 ); 327 328 mass_inserts($prefixeTable.'community_permissions', array_keys($insert), array($insert)); 329 330 conf_update_param('community_update', time()); 331 } 299 332 ?>
Note: See TracChangeset
for help on using the changeset viewer.