Bug in the deletion of favorites : even if the category was authorized, the
favorites where deleted for the user git-svn-id: http://piwigo.org/svn/trunk@167 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
151dc43370
commit
6d0112b562
1 changed files with 1 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ function check_favorites( $user_id )
|
|||
{
|
||||
array_push( $picture_cat, $picture_row['category_id'] );
|
||||
}
|
||||
if ( count( array_diff( $picture_cat, $restricted_cat ) ) > 0 )
|
||||
if ( count( array_diff( $picture_cat, $restricted_cat ) ) == 0 )
|
||||
{
|
||||
$query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
|
||||
$query.= ' WHERE image_id = '.$row['image_id'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue