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