Quote: › In g2helper.inc in function mapAllGalleryLinks
this line
$itemIds = (empty($albums)) ? array_diff($itemIds, array_keys($descendentCounts)) : array_keys($descendentCounts);
returns an empty array, even when the users have items in their albums. I don't know enough about Gallery2 to know how to fix it. Any suggestions?
Thanks
Sally
Replace it with:Code: › $itemIds = array();
if (empty($albums)) {
foreach ($descendentCounts as $key => $value) {
if ($value == 0) {
$itemIds[] = $key;
}
else {
continue;
}
}
}
else {
foreach ($descendentCounts as $key => $value) {
if ($value <> 0) {
$itemIds[] = $key;
}
else {
continue;
}
}
}
It's not the most elegant code, but it works 