add in comment another possibility for counting user total number of
viewable elements (counting only once pictures linked to several categories) git-svn-id: http://piwigo.org/svn/trunk@490 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
df07f5c59a
commit
46938a8f25
1 changed files with 12 additions and 1 deletions
|
|
@ -256,7 +256,18 @@ function count_user_total_images()
|
|||
if ( count( $user['restrictions'] ) > 0 )
|
||||
$query.= ' WHERE id NOT IN ('.$user['forbidden_categories'].')';
|
||||
$query.= ';';
|
||||
|
||||
|
||||
// $query = '
|
||||
// SELECT COUNT(DISTINCT(image_id)) as total
|
||||
// FROM '.PREFIX_TABLE.'image_category';
|
||||
// if (count($user['restrictions']) > 0)
|
||||
// {
|
||||
// $query.= '
|
||||
// WHERE category_id NOT IN ('.$user['forbidden_categories'].')';
|
||||
// }
|
||||
// $query = '
|
||||
// ;';
|
||||
|
||||
$row = mysql_fetch_array( mysql_query( $query ) );
|
||||
|
||||
if ( !isset( $row['total'] ) ) $row['total'] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue