Ignore:
Timestamp:
Oct 3, 2011, 2:18:46 PM (13 years ago)
Author:
plg
Message:

Make Community plugin compatible with the new upload form

The privacy level is set at the beginning of uploadify because Piwigo core
don't use 8 by default.

As soon as the user has created an album, he can't create another one (too
complicated to refresh the list of parent albums: this feature doesn't deserve
to make the code more complexe)

File:
1 edited

Legend:

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

    r11726 r12333  
    336336    }
    337337
    338     $row['name'] = strip_tags(
    339       trigger_event(
    340         'render_category_name',
    341         $row['name'],
    342         'ws_categories_getList'
    343         )
    344       );
     338    if ($params['fullname'])
     339    {
     340      $row['name'] = strip_tags(get_cat_display_name_cache($row['uppercats'], null, false));
     341    }
     342    else
     343    {
     344      $row['name'] = strip_tags(
     345        trigger_event(
     346          'render_category_name',
     347          $row['name'],
     348          'ws_categories_getList'
     349          )
     350        );
     351    }
    345352   
    346353    $row['comment'] = strip_tags(
     
    564571  community_update_cache_key();
    565572}
     573
     574add_event_handler('init', 'community_uploadify_privacy_level');
     575function community_uploadify_privacy_level()
     576{
     577  if (script_basename() == 'uploadify' and !is_admin())
     578  {
     579    $_POST['level'] = 16;
     580  }
     581}
    566582?>
Note: See TracChangeset for help on using the changeset viewer.