4
This is a fix for the backend.php that shipped with 1.52.
catads/backend.php
Line 28
Replace:
if (isset($_GET['id']) ){
$criteria = new Criteria('a.cat_id', $_GET['id']) ;
$channel_category .= " > " . xoops_utf8_encode(htmlspecialchars($myts->displayTarea(getTitleById($_GET['id']), ENT_QUOTES)));
}
else{$criteria = null;}
with:
if (isset($_GET['id']) ){
// pk - bugfix - for category RSS - omit waiting, suspended, un-published and expired.
$criteria = new CriteriaCompo(new Criteria('waiting', '0'));
$criteria->add(new Criteria('suspend', 0,'='));
$criteria->add(new Criteria('published', time(),'<'));
$criteria->add(new Criteria('expired', time(),'>'));
$criteria->add(new Criteria('a.cat_id', $_GET['id']));
$channel_category .= " > " . xoops_utf8_encode(htmlspecialchars($myts->displayTarea(getTitleById($_GET['id']), ENT_QUOTES)));
}
else {
// pk - bugfix - omit waiting, suspended, un-published and expired.
$criteria = new CriteriaCompo(new Criteria('waiting', '0'));
$criteria->add(new Criteria('suspend', 0,'='));
$criteria->add(new Criteria('published', time(),'<'));
$criteria->add(new Criteria('expired', time(),'>'));
}
Should work for 1.4 too, but my version of 1.4 didn't have a backend.php.