Ignore:
Timestamp:
Jul 13, 2012, 8:49:13 PM (12 years ago)
Author:
mistic100
Message:

-update menu when the temp collection is created
-update BatchDownloader confirmation message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/include/events.inc.php

    r16688 r16698  
    8989 
    9090  // get existing collections
    91   if (empty($UserCollection) and ($col_id = get_current_collection_id(false)) !== false)
     91  $col_id = get_current_collection_id(false);
     92  if (empty($UserCollection) and $col_id !== false)
    9293  {
    9394    $UserCollection = new UserCollection($col_id);
     
    101102  {
    102103    $collection = array();
     104  }
     105 
     106  // if the collection is created we don't use AJAX to force menu refresh
     107  if ($col_id === false)
     108  {
     109    $template->assign('NO_AJAX', true);
    103110  }
    104111 
     
    196203  if (is_a_guest()) return;
    197204 
    198   global $user;
    199  
    200205  $menu = &$menu_ref_arr[0];
    201206  if ($menu->get_id() != 'menubar') return;
    202  
    203   $query = '
    204 SELECT id
    205   FROM '.COLLECTIONS_TABLE.'
    206   WHERE user_id = '.$user['id'].'
    207   LIMIT 1
    208 ;';
    209   $result = pwg_query($query);
    210  
    211   if (!pwg_db_num_rows($result)) return;
    212  
     207   
    213208  $menu->register_block(new RegisteredBlock('mbUserCollection', l10n('Collections'), 'UserCollection'));
    214209}
Note: See TracChangeset for help on using the changeset viewer.