mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
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:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user