Skip to content

Commit

Permalink
Bug in the deletion of favorites : even if the category was authorize…
Browse files Browse the repository at this point in the history
…d, the

favorites where deleted for the user


git-svn-id: http://piwigo.org/svn/trunk@167 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
z0rglub committed Oct 4, 2003
1 parent 151dc43 commit 6d0112b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/include/functions.php
Expand Up @@ -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'];
Expand Down

0 comments on commit 6d0112b

Please sign in to comment.