Changeset 25975 for trunk/admin


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/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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']))
Note: See TracChangeset for help on using the changeset viewer.