Changeset 16698 for extensions/UserCollections/include/events.inc.php
- Timestamp:
- Jul 13, 2012, 8:49:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/include/events.inc.php
r16688 r16698 89 89 90 90 // 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) 92 93 { 93 94 $UserCollection = new UserCollection($col_id); … … 101 102 { 102 103 $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); 103 110 } 104 111 … … 196 203 if (is_a_guest()) return; 197 204 198 global $user;199 200 205 $menu = &$menu_ref_arr[0]; 201 206 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 213 208 $menu->register_block(new RegisteredBlock('mbUserCollection', l10n('Collections'), 'UserCollection')); 214 209 }
Note: See TracChangeset
for help on using the changeset viewer.