reenable Special category

This commit is contained in:
Andrew Dolgov 2009-12-17 20:47:03 +03:00
parent 3e0923463f
commit e2b7a85540

View File

@ -11,6 +11,8 @@
function render_category($link, $cat_id) { function render_category($link, $cat_id) {
$owner_uid = $_SESSION["uid"]; $owner_uid = $_SESSION["uid"];
if ($cat_id >= 0) {
if ($cat_id != 0) { if ($cat_id != 0) {
$cat_query = "cat_id = '$cat_id'"; $cat_query = "cat_id = '$cat_id'";
} else { } else {
@ -36,13 +38,13 @@
print "<ul id='cat-$cat_id' title='$title' myBackLabel='Feeds' print "<ul id='cat-$cat_id' title='$title' myBackLabel='Feeds'
myBackHref='index.php' myBackTarget='_self'>"; myBackHref='index.php' myBackTarget='_self'>";
// print "<li><a href='#cat-actions'>".__('Actions...')."</a></li>"; // print "<li><a href='#cat-actions'>".__('Actions...')."</a></li>";
while ($line = db_fetch_assoc($result)) { while ($line = db_fetch_assoc($result)) {
$id = $line["id"]; $id = $line["id"];
$unread = $line["unread"]; $unread = $line["unread"];
// $unread = rand(0, 100); // $unread = rand(0, 100);
if ($unread > 0) { if ($unread > 0) {
$line["title"] = $line["title"] . " ($unread)"; $line["title"] = $line["title"] . " ($unread)";
@ -63,8 +65,10 @@
} }
print "</ul>"; print "</ul>";
} else if ($cat_id == -1) {
/* print "<ul id='cat--1' title='$title'>"; print "<ul id='cat--1' title='$title' myBackLabel='Feeds'
myBackHref='index.php' myBackTarget='_self'>";
foreach (array(-4, -1,-2,-3) as $id) { foreach (array(-4, -1,-2,-3) as $id) {
$title = getFeedTitle($link, $id); $title = getFeedTitle($link, $id);
@ -77,11 +81,12 @@
$class = 'oldItem'; $class = 'oldItem';
} }
print "<li class='$class'><a href='feed.php?id=$id'>$title</a></li>"; print "<li class='$class'>
<a href='feed.php?id=$id&cat_id=-1'>$title</a></li>";
} }
print "</ul>"; */ print "</ul>";
}
} }
function render_categories_list($link) { function render_categories_list($link) {