Changeset 1528

Show
Ignore:
Timestamp:
08/10/06 15:10:28 (2 years ago)
Author:
cfriesen
Message:

Two things:

Using of the toolkit I commited earlier..
Prune items by channel.

Location:
trunk/gregarius
Files:
8 modified

Legend:

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

    r1522 r1528  
    4545 
    4646    echo "<label for=\"add_channel_to_folder\">". LBL_ADMIN_IN_FOLDER . "</label>\n"; 
    47     folder_combo('add_channel_to_folder'); 
     47    echo rss_toolkit_folders_combo('add_channel_to_folder'); 
    4848    echo "<label for=\"channel_tags\">" . LBL_TAG_FOLDERS . ":</label>\n"; 
    4949    echo "<input type=\"text\" name=\"channel_tags\" id=\"channel_tags\" />\n"; 
     
    187187    ."<legend>Selected...</legend>\n" 
    188188    ."<p>\n" 
    189     ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n"; 
    190     folder_combo('me_folder',null); 
     189    ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n" 
     190    .rss_toolkit_folders_combo('me_folder',null); 
    191191 
    192192    echo 
     
    785785 
    786786    // Folder 
    787     ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n"; 
    788  
    789     folder_combo('c_parent',$parent); 
    790     echo "</p>\n"; 
     787    ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n" 
     788 
     789    .rss_toolkit_folders_combo('c_parent',$parent) 
     790    ."</p>\n"; 
    791791 
    792792    // Tags 
  • trunk/gregarius/admin/folders.php

    r1495 r1528  
    128128 
    129129} 
    130  
    131 function folder_combo($name, $selected = -1) { 
    132     echo "\n<select name=\"$name\" id=\"$name\">\n"; 
    133     if (getConfig('rss.config.absoluteordering')) { 
    134         $sql = " order by position asc"; 
    135     } else { 
    136         $sql = " order by name asc"; 
    137     } 
    138     $res = rss_query("select id, name from " .getTable("folders") . $sql); 
    139     while (list($id, $name) = rss_fetch_row($res)) { 
    140         echo "\t<option value=\"$id\"" 
    141         .($selected > -1 && $selected == $id ? " selected=\"selected\"":"") 
    142         .">" .  (($name == "")?LBL_HOME_FOLDER:$name)  ."</option>\n"; 
    143     } 
    144     echo "</select>\n"; 
    145 } 
    146  
    147  
    148130 
    149131function folder_admin() { 
  • trunk/gregarius/admin/index.php

    r1502 r1528  
    4343require_once('themes.php'); 
    4444require_once('tags.php'); 
     45require_once('../cls/wrappers/toolkit.php'); 
    4546 
    4647define ('CST_ADMIN_DOMAIN','domain'); 
  • trunk/gregarius/admin/items.php

    r1275 r1528  
    2525# 
    2626############################################################################### 
     27 
     28rss_require('cls/wrappers/toolkit.php'); 
    2729 
    2830/** 
     
    4547    . "<option>" . LBL_ADMIN_PRUNE_YEARS . "</option>\n" 
    4648    . "</select></p>\n" 
     49    . "<p>\n" 
     50        . rss_toolkit_channels_combo("prune_channel") . "\n" 
     51    . "</p>\n" 
    4752    . "<p><label for=\"prune_include_sticky\">".LBL_ADMIN_PRUNE_INCLUDE_STICKY."</label>\n" 
    4853    . "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n" 
     
    9196                break; 
    9297            } 
    93             $sql = " from ".getTable('item') ." i, " .getTable('channels') . " c " 
     98            $sql = " from ".getTable('item') ." i INNER JOIN " .getTable('channels') . " c ON c.id=i.cid " 
    9499                   ." where 1=1 "; 
     100 
     101            if (array_key_exists('prune_channel', $_REQUEST)) { 
     102                if(ALL_CHANNELS_ID != $_REQUEST['prune_channel']) { 
     103                    $sql .= " and c.id = " . $_REQUEST['prune_channel'] . ""; 
     104                } 
     105            } 
    95106 
    96107            if ($prune_older > 0) { 
     
    135146                } 
    136147            } 
    137  
    138148 
    139149            if (array_key_exists(CST_ADMIN_CONFIRMED,$_REQUEST)) { 
  • trunk/gregarius/admin/opml.php

    r1181 r1528  
    6868 
    6969    ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_folder\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_FOLDER."\" />\n" 
    70     ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>"; 
    71     folder_combo('opml_import_to_folder',null); 
    72     echo "</p>\n" 
     70    ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>" 
     71    .rss_toolkit_folders_combo('opml_import_to_folder',null) 
     72    ."</p>\n" 
    7373 
    7474    ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_wipe\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_WIPE."\" />\n" 
    7575    ."<label for=\"opml_import_option_wipe\" >".LBL_ADMIN_OPML_IMPORT_WIPE."</label></p>\n" 
    76  
    7776 
    7877    .""; 
  • trunk/gregarius/cls/search.php

    r1520 r1528  
    3535define ('HIT_BEFORE',"<span class=\"searchhit\">"); 
    3636define ('HIT_AFTER',"</span>"); 
    37 define ('ALL_CHANNELS_ID', -1); 
    3837 
    3938define ('QUERY_ORDER_BY','rss_order'); 
  • trunk/gregarius/search.php

    r1208 r1528  
    3030rss_require('cls/search.php'); 
    3131rss_require('cls/wrappers/searchform.php'); 
     32rss_require('cls/wrappers/toolkit.php'); 
    3233 
    3334$GLOBALS['rss'] -> feedList = new FeedList(false); 
  • trunk/gregarius/themes/default/web/searchform.php

    r1302 r1528  
    2020    <p> 
    2121        <label for="<?php echo QUERY_CHANNEL ?>"><?php echo LBL_SEARCH_CHANNELS ?></label> 
    22         <?php echo rss_search_channels_combo(QUERY_CHANNEL); ?> 
     22        <?php echo rss_toolkit_channels_combo(QUERY_CHANNEL, ALL_CHANNELS_ID, (array_key_exists(QUERY_CHANNEL, $_REQUEST) ? $_REQUEST[QUERY_CHANNEL] : 0)); ?> 
    2323    </p> 
    2424