From 6d0112b562ead68210b1ac1d27a4db0129c71aea Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 4 Oct 2003 17:13:19 +0000 Subject: [PATCH] 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 --- admin/include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/include/functions.php b/admin/include/functions.php index 0f35c2798..22361a579 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -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'];