Ignore:
Timestamp:
Oct 9, 2014, 10:10:48 PM (10 years ago)
Author:
plg
Message:

compatibility with Piwigo 2.7

For now, we keep uploadify (Flash) on Community because it is more compatible
with old browsers like IE8/IE9. Once the new HTML5 upload form will be more
mature, we will replace uploadify on Community too.

File:
1 edited

Legend:

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

    r27038 r29970  
    2424define('COMMUNITY_PERMISSIONS_TABLE', $prefixeTable.'community_permissions');
    2525define('COMMUNITY_PENDINGS_TABLE', $prefixeTable.'community_pendings');
    26 define('COMMUNITY_VERSION', 'auto');
    2726
    2827include_once(COMMUNITY_PATH.'include/functions_community.inc.php');
     
    3837function community_init()
    3938{
    40   global $conf, $user, $pwg_loaded_plugins;
    41 
    42   // apply upgrade if needed
    43   if (
    44     COMMUNITY_VERSION == 'auto' or
    45     $pwg_loaded_plugins[COMMUNITY_ID]['version'] == 'auto' or
    46     safe_version_compare($pwg_loaded_plugins[COMMUNITY_ID]['version'], COMMUNITY_VERSION, '<')
    47   )
    48   {
    49     // call install function
    50     include_once(COMMUNITY_PATH.'include/install.inc.php');
    51     community_install();
    52 
    53     // update plugin version in database
    54     if ( $pwg_loaded_plugins[COMMUNITY_ID]['version'] != 'auto' and COMMUNITY_VERSION != 'auto' )
    55     {
    56       $query = '
    57 UPDATE '. PLUGINS_TABLE .'
    58 SET version = "'. COMMUNITY_VERSION .'"
    59 WHERE id = "'. COMMUNITY_ID .'"';
    60       pwg_query($query);
    61 
    62       $pwg_loaded_plugins[COMMUNITY_ID]['version'] = COMMUNITY_VERSION;
    63     }
    64   }
     39  global $conf, $user;
    6540
    6641  // prepare plugin configuration
    67   $conf['community'] = unserialize($conf['community']);
     42  $conf['community'] = safe_unserialize($conf['community']);
    6843
    6944  // TODO: generate permissions in $user['community_permissions'] if ws.php
     
    416391    {
    417392      $row['name'] = strip_tags(
    418         trigger_event(
     393        trigger_change(
    419394          'render_category_name',
    420395          $row['name'],
     
    425400   
    426401    $row['comment'] = strip_tags(
    427       trigger_event(
     402      trigger_change(
    428403        'render_category_description',
    429404        $row['comment'],
Note: See TracChangeset for help on using the changeset viewer.