Ignore:
Timestamp:
06/07/13 14:41:14 (7 years ago)
Author:
plg
Message:

New feature: user album. Only for registered users, no recursivity. Piwigo
will automatically create an upload album for each user with appropriate
community permissions, at first connection.

Bug fixed: on activation, do not create a new "Community" album if it already
exists.

Bug fixed: remove debug for quota

Bug fixed: round corners for number of pending pictures in admin menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/include/install.inc.php

    r23037 r23085  
    3333  user_id smallint(5) DEFAULT NULL, 
    3434  category_id smallint(5) unsigned DEFAULT NULL, 
     35  user_album enum(\'true\',\'false\') NOT NULL DEFAULT \'false\', 
    3536  recursive enum(\'true\',\'false\') NOT NULL DEFAULT \'true\', 
    3637  create_subcategories enum(\'true\',\'false\') NOT NULL DEFAULT \'false\', 
     
    6667    pwg_query('ALTER TABLE `'.$prefixeTable .'community_permissions` ADD `storage` INT DEFAULT NULL;'); 
    6768  } 
     69 
     70  // column community_permissions.user_album added for version 2.5.d 
     71  $result = pwg_query('SHOW COLUMNS FROM `'.$prefixeTable.'community_permissions` LIKE "user_album";'); 
     72  if (!pwg_db_num_rows($result)) 
     73  {      
     74    pwg_query('ALTER TABLE `'.$prefixeTable .'community_permissions` ADD `user_album` enum(\'true\',\'false\') NOT NULL DEFAULT \'false\' after `category_id`;'); 
     75  } 
     76 
     77  // column categories.community_user added for version 2.5.d 
     78  $result = pwg_query('SHOW COLUMNS FROM `'.$prefixeTable.'categories` LIKE "community_user";'); 
     79  if (!pwg_db_num_rows($result)) 
     80  {      
     81    pwg_query('ALTER TABLE `'.$prefixeTable .'categories` ADD `community_user`  smallint(5) DEFAULT NULL;'); 
     82  } 
     83 
     84  if (!isset($conf['community'])) 
     85  { 
     86    $community_default_config = serialize( 
     87      array( 
     88        'user_albums' => false, 
     89        ) 
     90      ); 
     91     
     92    conf_update_param('community', $community_default_config); 
     93    $conf['community'] = $community_default_config; 
     94  } 
    6895} 
    6996?> 
Note: See TracChangeset for help on using the changeset viewer.