mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
Use the stored calculated date users.forbidden_categories instead of trying
to use a deprecated function get_all_restrictions git-svn-id: http://piwigo.org/svn/branches/release-1_3@293 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -313,14 +313,14 @@ function delete_group( $group_id )
|
|||||||
// or invisible)
|
// or invisible)
|
||||||
function check_favorites( $user_id )
|
function check_favorites( $user_id )
|
||||||
{
|
{
|
||||||
$query = 'SELECT status';
|
$query = 'SELECT status,forbidden_categories';
|
||||||
$query.= ' FROM '.PREFIX_TABLE.'users';
|
$query.= ' FROM '.PREFIX_TABLE.'users';
|
||||||
$query.= ' WHERE id = '.$user_id;
|
$query.= ' WHERE id = '.$user_id;
|
||||||
$query.= ';';
|
$query.= ';';
|
||||||
$row = mysql_fetch_array( mysql_query( $query ) );
|
$row = mysql_fetch_array( mysql_query( $query ) );
|
||||||
$status = $row['status'];
|
$status = $row['status'];
|
||||||
// retrieving all the restricted categories for this user
|
// retrieving all the restricted categories for this user
|
||||||
$restricted_cat = get_all_restrictions( $user_id, $status );
|
$restricted_cat = explode( ',', $row['forbidden_categories'] );
|
||||||
// retrieving all the favorites for this user and comparing their
|
// retrieving all the favorites for this user and comparing their
|
||||||
// categories to the restricted categories
|
// categories to the restricted categories
|
||||||
$query = 'SELECT image_id';
|
$query = 'SELECT image_id';
|
||||||
|
|||||||
Reference in New Issue
Block a user