Changeset 27388 for trunk/include/functions_user.inc.php
- Timestamp:
- Feb 16, 2014, 8:39:19 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r27158 r27388 427 427 WHERE category_id NOT IN ('.$userdata['forbidden_categories'].') 428 428 AND level>'.$userdata['level']; 429 $forbidden_ids = array_from_query($query, 'id');429 $forbidden_ids = query2array($query,null, 'id'); 430 430 431 431 if ( empty($forbidden_ids) ) … … 545 545 ).' 546 546 ;'; 547 $authorizeds = array_from_query($query, 'image_id');547 $authorizeds = query2array($query,null, 'image_id'); 548 548 549 549 $query = ' … … 552 552 WHERE user_id = '.$user['id'].' 553 553 ;'; 554 $favorites = array_from_query($query, 'image_id');554 $favorites = query2array($query,null, 'image_id'); 555 555 556 556 $to_deletes = array_diff($favorites, $authorizeds); … … 585 585 WHERE status = \'private\' 586 586 ;'; 587 $private_array = array_from_query($query, 'id');587 $private_array = query2array($query,null, 'id'); 588 588 589 589 // retrieve category ids directly authorized to the user … … 593 593 WHERE user_id = '.$user_id.' 594 594 ;'; 595 $authorized_array = array_from_query($query, 'cat_id');595 $authorized_array = query2array($query,null, 'cat_id'); 596 596 597 597 // retrieve category ids authorized to the groups the user belongs to … … 605 605 array_merge( 606 606 $authorized_array, 607 array_from_query($query, 'cat_id')607 query2array($query,null, 'cat_id') 608 608 ); 609 609 … … 623 623 WHERE visible = \'false\' 624 624 ;'; 625 $result = pwg_query($query); 626 while ($row = pwg_db_fetch_assoc($result)) 627 { 628 $forbidden_array[] = $row['id']; 629 } 625 $forbidden_array = array_merge($forbidden_array, query2array($query, null, 'id') ); 630 626 $forbidden_array = array_unique($forbidden_array); 631 627 } … … 869 865 $level = max( $conf['available_permission_levels'] ); 870 866 } 871 else 867 elseif (($user_id == $conf['guest_id']) or 872 868 ($user_id == $conf['default_user_id'])) 873 869 {
Note: See TracChangeset
for help on using the changeset viewer.