Ignore:
Timestamp:
Jul 23, 2012, 6:16:34 PM (12 years ago)
Author:
mistic100
Message:

add option to block permissions recalculation

File:
1 edited

Legend:

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

    r16938 r16939  
    1717
    1818add_event_handler('invalidate_user_cache', 'smart_make_all_associations');
     19add_event_handler('init', 'smart_init');
    1920
    2021include_once(SMART_PATH.'include/functions.inc.php');
    21 
    22 if (script_basename() == 'index')
    23 {
    24   add_event_handler('loc_end_section_init', 'smart_init_page_items');
    25   include_once(SMART_PATH.'include/page_items.php');
    26 }
    27 else if (script_basename() == 'admin')
    28 {
    29   add_event_handler('init', 'smart_init');
    30 }
    3122
    3223function smart_init()
     
    3627  load_language('plugin.lang', SMART_PATH);
    3728  $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']);
     29 
     30  if ( script_basename() == 'index' and $conf['SmartAlbums']['smart_is_forbidden'] )
     31  {
     32    add_event_handler('loc_end_section_init', 'smart_init_page_items');
     33    include_once(SMART_PATH.'include/page_items.php');
     34  }
     35  else if (script_basename() == 'admin')
     36  {
     37    include_once(SMART_PATH.'include/cat_list.php');
    3838   
    39   include_once(SMART_PATH.'include/cat_list.php');
    40  
    41  
    42   add_event_handler('loc_begin_cat_list', 'smart_cat_list');
    43   add_event_handler('tabsheet_before_select','smart_tab', 50, 2);
    44   add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
     39    add_event_handler('loc_begin_cat_list', 'smart_cat_list');
     40    add_event_handler('tabsheet_before_select','smart_tab', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
     41    add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
     42  }
    4543}
    4644
Note: See TracChangeset for help on using the changeset viewer.