Ignore:
Timestamp:
Mar 15, 2006, 3:26:25 AM (18 years ago)
Author:
rvelices
Message:

feature 262: new user cached information nb_total_pictures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_category.inc.php

    r1061 r1081  
    105105
    106106/**
    107  * returns the total number of elements viewable in the gallery by the
    108  * connected user
    109  *
    110  * @return int
    111  */
    112 function count_user_total_images()
    113 {
    114   global $user;
    115 
    116   $query = '
    117 SELECT COUNT(DISTINCT(image_id)) as total
    118   FROM '.IMAGE_CATEGORY_TABLE.'
    119   WHERE category_id NOT IN ('.$user['forbidden_categories'].')
    120 ;';
    121   list($total) = mysql_fetch_array(pwg_query($query));
    122 
    123   return $total;
    124 }
    125 
    126 /**
    127107 * Retrieve informations about a category in the database
    128108 *
Note: See TracChangeset for help on using the changeset viewer.