Hab grad nen kleinen Bug behoben:
// Lightbox count MOD BEGIN
if (!empty($user_info['lightbox_image_ids'])) {
$image_id_sql = str_replace(" ", ", ", trim($user_info['lightbox_image_ids']));
$sql = "SELECT COUNT(image_id) AS images
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND image_id IN ($image_id_sql) AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")";
$result = $site_db->query_firstrow($sql);
$lightbox_rows = $result['images'];
} else {
$lightbox_rows = 0;
}
$site_template->register_vars(array(
"lightbox_count" => $lightbox_rows
));
// Lightbox count MOD END
Der Bug war: Wenn der User ein Bild im Leuchtkasten hatte, das nichtmehr existierte oder für das er mittlerweile keine Berechtigungen mehr hatte, wurde es trotzdem mitgezählt.
Grüße
Faux