Ignore:
Timestamp:
Mar 1, 2011, 11:09:35 AM (10 years ago)
Author:
plg
Message:

bug fixed: use the same function to check permissions on menubar and on upload
form (groups where not fixed for menubar)

bug fixed: if no permission defined, the upload_categories was empty and SQL
query was crashing Piwigo

admins get automatically full permissions

File:
1 edited

Legend:

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

    r9376 r9444  
    2626  global $conf;
    2727
     28  if (is_admin())
     29  {
     30    return array(
     31      'upload_whole_gallery' => true,
     32      'create_whole_gallery' => true,
     33      'create_categories' => array(),
     34      'upload_categories' => array(),
     35      'permission_ids' => array(),
     36      );
     37  }
     38
    2839  $return = array(
    2940    'upload_whole_gallery' => false,
     
    3344    'permission_ids' => array(),
    3445    );
    35 
    36   $user_permissions = array();
    3746 
    3847  // what are the user groups?
     
    96105  }
    97106
    98   if (!$return['upload_whole_gallery'])
     107  if (!$return['upload_whole_gallery'] and count($return['upload_categories']) > 0)
    99108  {
    100109    $return['upload_categories'] = get_subcat_ids($return['upload_categories']);
Note: See TracChangeset for help on using the changeset viewer.