--- items.php.orig 2005-12-28 14:25:39.000000000 -0500
+++ items.php 2005-12-28 14:25:43.000000000 -0500
@@ -44,6 +44,8 @@
. "<option>" . LBL_ADMIN_PRUNE_MONTHS . "</option>\n"
. "<option>" . LBL_ADMIN_PRUNE_YEARS . "</option>\n"
. "</select></p>\n"
+ . "<p><label for=\"prune_include_unread\">".LBL_ADMIN_PRUNE_INCLUDE_UNREAD."</label>\n"
+ . "<input type=\"checkbox\" id=\"prune_include_unread\" name=\"prune_include_unread\" value=\"1\"/></p>\n"
. "<p><label for=\"prune_include_sticky\">".LBL_ADMIN_PRUNE_INCLUDE_STICKY."</label>\n"
. "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n"
. "<p><label for=\"prune_exclude_tags\">".LBL_ADMIN_PRUNE_EXCLUDE_TAGS."</label>\n"
@@ -99,6 +101,11 @@
$sql .= " and ifnull(i.pubdate, i.added) < '$prune_older_date'";
}
+ if (!array_key_exists('prune_include_unread', $_REQUEST)
+ || $_REQUEST['prune_include_unread'] != '1') {
+
+ $sql .= " and not(unread & " .FEED_MODE_UNREAD_STATE .") ";
+ }
if (!array_key_exists('prune_include_sticky', $_REQUEST)
|| $_REQUEST['prune_include_sticky'] != '1') {
and add
define ('LBL_ADMIN_PRUNE_INCLUDE_UNREAD','Delete Unread items too: ');
to intl/*.php (sorry, haven't got translations..)