Ignore:
Timestamp:
Mar 9, 2011, 2:06:10 PM (13 years ago)
Author:
plg
Message:

bug fixed: invalidate_user_cache now also invalidates community user
permissions cache

bug fixed: community permissions cache was not refreshed when user connects,
I have added $_SESSIONcommunity_user_id to make sure the permissions are
related to the correct user

change: use a random key for cache update to avoid "in the same second
refresh".

filter the list of parent albums for "create a new album" based on permissions
even when create_whole_gallery is true

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/main.inc.php

    r9563 r9583  
    127127  // photos" link in the gallery menu
    128128  $user_permissions = community_get_user_permissions($user['id']);
    129  
     129
    130130  if (count($user_permissions['upload_categories']) == 0 and !$user_permissions ['create_whole_gallery'])
    131131  {
     
    213213  community_reject_user_pendings($user_id);
    214214}
     215
     216add_event_handler('invalidate_user_cache', 'community_refresh_cache_update_time');
     217function community_refresh_cache_update_time()
     218{
     219  community_update_cache_key();
     220}
    215221?>
Note: See TracChangeset for help on using the changeset viewer.