Show
Ignore:
Timestamp:
10/04/06 21:01:04 (2 years ago)
Author:
mbonetti
Message:

applied patch by Bruce Dillahunty to preserve unread items while pruning

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/admin/items.php

    r1561 r1597  
    5252    . "<p><label for=\"prune_include_sticky\">".__('Delete Sticky items too: ')."</label>\n" 
    5353    . "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n" 
     54    . "<p><label for=\"prune_include_unread\">".__('Delete Unread items too: ')."</label>\n" 
     55    . "<input type=\"checkbox\" id=\"prune_include_unread\" name=\"prune_include_unread\" value=\"1\"/></p>\n" 
    5456    . "<p><label for=\"prune_exclude_tags\">".__('Do not delete items tagged... ')."</label>\n" 
    5557    . "<input type=\"text\" id=\"prune_exclude_tags\" name=\"prune_exclude_tags\" value=\"\"/></p>\n" 
     
    112114            if (!array_key_exists('prune_include_sticky', $_REQUEST) 
    113115                    || $_REQUEST['prune_include_sticky'] != '1') { 
    114  
    115116                $sql .= " and not(unread & " .RSS_MODE_STICKY_STATE .") "; 
    116117            } 
    117118 
    118             if (array_key_exists('prune_exclude_tags', $_REQUEST) 
    119                     && trim($_REQUEST['prune_exclude_tags'])) { 
     119 
     120            if (!array_key_exists('prune_include_unread', $_REQUEST)  
     121                    || $_REQUEST['prune_include_unread'] != '1') { 
     122                $sql .= " and not(unread & " .RSS_MODE_UNREAD_STATE .") ";  
     123            } 
     124             
     125             if (array_key_exists('prune_exclude_tags', $_REQUEST) && trim($_REQUEST['prune_exclude_tags'])) { 
    120126 
    121127                if ( trim($_REQUEST['prune_exclude_tags']) == '*') {