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:
z0rglub 2003-10-04 17:13:19 +00:00
commit 6d0112b562

View file

@ -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'];