Update of the user preferences panel.

Deletion of some PREFIX_TABLE occurences


git-svn-id: http://piwigo.org/svn/trunk@630 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
gweltas
2004-12-02 15:42:57 +00:00
parent 19be28e415
commit b35dc19ab6
9 changed files with 125 additions and 135 deletions

View File

@@ -409,8 +409,7 @@ function check_favorites( $user_id )
$restricted_cat = array();
// retrieving all the favorites for this user and comparing their
// categories to the restricted categories
$query = 'SELECT image_id';
$query.= ' FROM '.PREFIX_TABLE.'favorites';
$query = 'SELECT image_id FROM '.FAVORITES_TABLE;
$query.= ' WHERE user_id = '.$user_id;
$query.= ';';
$result = pwg_query ( $query );
@@ -432,7 +431,7 @@ function check_favorites( $user_id )
}
if ( count( array_diff( $picture_cat, $restricted_cat ) ) == 0 )
{
$query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
$query = 'DELETE FROM '.FAVORITES_TABLE;
$query.= ' WHERE image_id = '.$row['image_id'];
$query.= ' AND user_id = '.$user_id;
$query.= ';';