Changeset 25975


Ignore:
Timestamp:
Dec 16, 2013, 9:18:56 PM (10 years ago)
Author:
rvelices
Message:

invalidate_user_cache fix in web service method + do not invalidate user cache on every page hit on album list, photo etc ...

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r25930 r25975  
    264264        'site_manager', // delete site
    265265        'site_update',  // ?only POST
    266         'cat_list',     // delete cat
    267         'cat_move',     // ?only POST
    268         'cat_options',  // ?only POST; public/private; lock/unlock
    269         'user_perm',
    270         'group_perm',
    271         'group_list',   // delete group
    272266      )
    273267    )
    274268    or ( !empty($_POST) and in_array($page['page'],
    275269        array(
    276           'photo',
    277270          'album',        // public/private; lock/unlock, permissions
     271          'cat_move',
     272          'cat_options',  // public/private; lock/unlock
    278273          'batch_manager',  // associate/dissociate; delete; set level
    279274          'user_list',    // group assoc; user level
     275          'user_perm',
    280276        )
    281277      )
  • trunk/admin/cat_list.php

    r25425 r25975  
    116116  $_SESSION['page_infos'] = array(l10n('Virtual album deleted'));
    117117  update_global_rank();
     118  invalidate_user_cache();
    118119
    119120  $redirect_url = get_root_url().'admin.php?page=cat_list';
     
    121122  {
    122123    $redirect_url.= '&parent_id='.$_GET['parent_id'];
    123   } 
     124  }
    124125  redirect($redirect_url);
    125126}
    126127// request to add a virtual category
    127 else if (isset($_POST['submitAdd']))
     128elseif (isset($_POST['submitAdd']))
    128129{
    129130  $output_create = create_virtual_category(
     
    132133    );
    133134
     135  invalidate_user_cache();
    134136  if (isset($output_create['error']))
    135137  {
     
    142144}
    143145// save manual category ordering
    144 else if (isset($_POST['submitManualOrder']))
     146elseif (isset($_POST['submitManualOrder']))
    145147{
    146148  asort($_POST['catOrd'], SORT_NUMERIC);
     
    149151  $page['infos'][] = l10n('Album manual order was saved');
    150152}
    151 else if (isset($_POST['submitAutoOrder']))
     153elseif (isset($_POST['submitAutoOrder']))
    152154{
    153155  $query = '
  • trunk/admin/group_list.php

    r25449 r25975  
    360360    }
    361361  }
     362  invalidate_user_cache();
    362363}
    363364// +-----------------------------------------------------------------------+
  • trunk/admin/group_perm.php

    r25018 r25975  
    113113
    114114  mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $inserts);
     115  invalidate_user_cache();
    115116}
    116117
  • trunk/admin/picture_modify.php

    r25425 r25975  
    8383    explode(',', calculate_permissions($user['id'], $user['status']))
    8484    );
    85  
     85
    8686  foreach ($authorizeds as $category_id)
    8787  {
     
    176176  move_images_to_categories(array($_GET['image_id']), $_POST['associate']);
    177177
     178  invalidate_user_cache();
     179
    178180  // thumbnail for albums
    179181  if (!isset($_POST['represent']))
     
    181183    $_POST['represent'] = array();
    182184  }
    183  
     185
    184186  $no_longer_thumbnail_for = array_diff($represent_options_selected, $_POST['represent']);
    185187  if (count($no_longer_thumbnail_for) > 0)
     
    200202
    201203  $represent_options_selected = $_POST['represent'];
    202  
     204
    203205  $page['infos'][] = l10n('Photo informations updated');
    204206}
     
    321323;';
    322324  list($row['nb_rates']) = pwg_db_fetch_row(pwg_query($query));
    323  
     325
    324326  $intro_vars['stats'].= ', '.sprintf(l10n('Rated %d times, score : %.2f'), $row['nb_rates'], $row['rating_score']);
    325327}
    326328
    327329$template->assign('INTRO', $intro_vars);
    328  
     330
    329331
    330332if (in_array(get_extension($row['path']),$conf['picture_ext']))
  • trunk/include/ws_functions/pwg.groups.php

    r25968 r25975  
    150150  pwg_query($query);
    151151
     152  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
     153  invalidate_user_cache();
     154
    152155  return new PwgNamedArray($groupnames, 'group_deleted');
    153156}
     
    247250    );
    248251
     252  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    249253  invalidate_user_cache();
    250254
     
    281285  pwg_query($query);
    282286
     287  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    283288  invalidate_user_cache();
    284289
Note: See TracChangeset for help on using the changeset viewer.