Ignore:
Timestamp:
Jun 14, 2011, 6:41:10 PM (13 years ago)
Author:
mistic100
Message:

Add event_handler on 'login_success' and 'invalidate_user_cache' to regenerate SmartAlbums content

File:
1 edited

Legend:

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

    r11334 r11376  
    1616define('CATEGORY_FILTERS_TABLE', $prefixeTable.'category_filters');
    1717
     18add_event_handler('invalidate_user_cache', 'smart_make_all_associations');
     19add_event_handler('login_success', 'smart_make_all_associations');
     20include_once(SMART_PATH.'include/functions.inc.php');
     21
    1822if (script_basename() == 'index')
    1923{
     
    3034  add_event_handler('loc_begin_cat_list', 'smart_cat_list');
    3135  include_once(SMART_PATH.'include/init_cat_list.php');
     36 
     37  add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
     38        function smart_admin_menu($menu)
     39        {
     40                array_push($menu, array(
     41                        'NAME' => 'SmartAlbums',
     42                        'URL' => get_root_url().'admin.php?page=plugin-' . SMART_DIR));
     43                return $menu;
     44        }
    3245}
    3346
Note: See TracChangeset for help on using the changeset viewer.