Changeset 1978


Ignore:
Timestamp:
Apr 26, 2007, 3:59:39 AM (17 years ago)
Author:
rvelices
Message:

invalidation of the users cache done in a function and an action is triggered

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1952 r1978  
    155155
    156156$template->parse('admin');
    157 include(PHPWG_ROOT_PATH.'include/page_tail.php');
    158157
    159158// +-----------------------------------------------------------------------+
     
    180179  )
    181180{
    182   $query = '
    183 UPDATE '.USER_CACHE_TABLE.'
    184   SET need_update = \'true\'
    185 ;';
    186   pwg_query($query);
     181  invalidate_user_cache();
    187182}
    188183
     184include(PHPWG_ROOT_PATH.'include/page_tail.php');
    189185?>
  • trunk/admin/include/functions.php

    r1932 r1978  
    20142014}
    20152015
     2016/**
     2017 * Invalidates cahed data (permissions and category counts) for all users.
     2018 */
     2019function invalidate_user_cache()
     2020{
     2021  $query = '
     2022UPDATE '.USER_CACHE_TABLE.'
     2023  SET need_update = \'true\'
     2024;';
     2025  pwg_query($query);
     2026  trigger_action('invalidate_user_cache');
     2027}
    20162028?>
Note: See TracChangeset for help on using the changeset viewer.