Probiere mal folgendes. Bin mir aber nicht sicher obs 100%ig funktioniert.
Ersetze in global.php
if (defined("GET_CACHES")) {
$new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY c.cat_order, c.cat_name ASC";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$cat_cache[$row['cat_id']] = $row;
$cat_parent_cache[$row['cat_parent_id']][] = $row['cat_id'];
$new_image_cache[$row['cat_id']] = $row['new_images'];
}
$site_db->free_result();
$sql = "SELECT cat_id, COUNT(*) AS num_images
FROM ".IMAGES_TABLE."
WHERE image_active = 1
GROUP BY cat_id";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$cat_cache[$row['cat_id']]['num_images'] = $row['num_images'];
}
$site_db->free_result();
} //end if GET_CACHES
durch
if (defined("GET_CACHES")) {
$sql = "SELECT cat_id, COUNT(*) AS num_images
FROM ".IMAGES_TABLE."
WHERE image_active = 1
GROUP BY cat_id";
$result = $site_db->query($sql);
$cat_cache_num = array();
while ($row = $site_db->fetch_array($result)) {
$cat_cache_num[$row['cat_id']] = $row['num_images'];
}
$site_db->free_result();
$new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
FROM ".CATEGORIES_TABLE." c
LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
GROUP BY c.cat_id
ORDER BY c.cat_order, c.cat_name ASC";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
if ($cat_cache_num[$row['cat_id']] > 0) {
$cat_cache[$row['cat_id']] = $row;
$cat_cache[$row['cat_id']]['num_images'] = $cat_cache_num[$row['cat_id']];
if ($cat_cache_num[$row['cat_parent_id']] > 0) {
$cat_parent_cache[$row['cat_parent_id']][] = $row['cat_id'];
}
$new_image_cache[$row['cat_id']] = $row['new_images'];
}
}
$site_db->free_result();
} //end if GET_CACHES
Jan