Changeset 1772 for trunk/gregarius/admin

Show
Ignore:
Timestamp:
11/03/07 00:28:42 (13 months ago)
Author:
cfriesen
Message:

Include flag in the item pruning.
Close #318

Files:
1 modified

Legend:

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

    r1661 r1772  
    2929 
    3030/** 
    31  * renders the pruneing form 
     31 * renders the pruning form 
    3232 */ 
    3333function items() { 
     
    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" 
     54    . "<p><label for=\"prune_include_flag\">".__('Delete Flag items too: ')."</label>\n" 
     55    . "<input type=\"checkbox\" id=\"prune_include_flag\" name=\"prune_include_flag\" value=\"1\"/></p>\n" 
     56    . "<p><label for=\"prune_include_unread\">".__('Delete Unread items too: ')."</label>\n" 
     57    . "<input type=\"checkbox\" id=\"prune_include_unread\" name=\"prune_include_unread\" value=\"1\"/></p>\n" 
    5658    . "<p><label for=\"prune_exclude_tags\">".__('Do not delete items tagged... ')."</label>\n" 
    5759    . "<input type=\"text\" id=\"prune_exclude_tags\" name=\"prune_exclude_tags\" value=\"\"/></p>\n" 
     
    117119            } 
    118120 
     121                        if (!array_key_exists('prune_include_flag', $_REQUEST) 
     122                                        || $_REQUEST['prune_include_flag'] != '1') { 
     123                                $sql .= " and not(unread & " . RSS_MODE_FLAG_STATE . ") "; 
     124                        } 
     125 
    119126 
    120127            if (!array_key_exists('prune_include_unread', $_REQUEST)  
     
    155162 
    156163            if (array_key_exists(CST_ADMIN_CONFIRMED,$_REQUEST)) { 
    157      
    158                  
    159                  
    160                 // Possible fix for #207: max out execution time 
    161                 // to avoid timeouts 
    162                 @set_time_limit(0); 
    163                 @ini_set('max_execution_time', 60*10); 
    164                  
    165                  
    166      
     164                                // Possible fix for #207: max out execution time 
     165                                // to avoid timeouts 
     166                                @set_time_limit(0); 
     167                        @ini_set('max_execution_time', 60*10); 
     168 
    167169                //echo "<pre>\n"; 
    168170                //delete the tags for these items 
    169171                $sqlids = "select distinct i.id,i.cid " . $sql 
    170172                          . " order by i.cid, i.id desc"; 
    171  
    172173 
    173174                $rs = rss_query($sqlids); 
     
    176177                //echo "to be deleted\n"; 
    177178                while (list($id,$cid) = rss_fetch_row($rs)) { 
    178  
    179179                    $cids[$cid][]= $id; 
    180180