]> git.wh0rd.org Git - tt-rss.git/commitdiff
purging of old posts is actually configurable now, added comments for some configurat...
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Sep 2005 15:50:12 +0000 (16:50 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Sep 2005 15:50:12 +0000 (16:50 +0100)
backend.php
config.php-dist
functions.php

index 0fb3d1e85120842bb04aeac8581bc2f1569b057f..ef6caf0b10fc35ca0256fc9e541a63c91e23e5ea 100644 (file)
                        <a class=\"button\" 
                                href=\"javascript:editSelectedFeed()\">Edit</a>&nbsp;
                        <a class=\"buttonWarn\" 
-                               href=\"javascript:removeSelectedFeeds()\">Remove</a>&nbsp;
-                       <a class=\"button\" 
-                               href=\"javascript:readSelectedFeeds()\">Mark as read</a>&nbsp;
-                       <a class=\"button\" 
-                               href=\"javascript:unreadSelectedFeeds()\">Mark as unread</a>&nbsp;
+                               href=\"javascript:removeSelectedFeeds()\">Remove</a>&nbsp;";
+                       if (ENABLE_PREFS_CATCHUP_UNCATCHUP) {
+                               print "
+                               <a class=\"button\" 
+                                       href=\"javascript:readSelectedFeeds()\">Mark as read</a>&nbsp;
+                               <a class=\"button\" 
+                                       href=\"javascript:unreadSelectedFeeds()\">Mark as unread</a>&nbsp;";
+                       }
+                       print "
                        All feeds:&nbsp; 
                                <a class=\"button\" href=\"opml.php?op=Export\">Export OPML</a>";
                
index b02e4c438a0bc3b7991cc6144ae3a4b2ed5bd772..e441a94bee09df1d620e9bcde1463202d60524f3 100644 (file)
@@ -1,13 +1,27 @@
 <?
        define(DB_CONN, "host=localhost dbname=fox user=fox password=XXXXXXXXXXX");
+       // DB connection string, PostgreSQL must be configured to accept connections
+       // via TCP/IP and authentified by password.
+       
        define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache');
-       define(HEADLINES_PER_PAGE, 15);
+       // Local cache directory for RSS feeds
+
+       define(HEADLINES_PER_PAGE, 15); 
        define(MIN_UPDATE_TIME, 1800);
+       
        define(WEB_DEMO_MODE, false);
-       define(ENABLE_FEED_ICONS, true);
+       
+       define(ENABLE_FEED_ICONS, true);        
        define(ICONS_DIR, "icons");
        define(ICONS_URL, "icons");
+       
        define(PURGE_OLD_DAYS, 30);
+       // Articles older than this number of days will be deleted automatically
+       
        define(UPDATE_POST_ON_CHECKSUM_CHANGE, true);
+       
+       define(ENABLE_PREFS_CATCHUP_UNCATCHUP, false);
+       // enable "Mark as read/unread" buttons in preferences dialog
+       
 ?>
 
index ab9b571feb9ede107442e2395f87caaa2a245d48..9df3351889fc91f146cfeb708e009684e5484e6e 100644 (file)
@@ -4,9 +4,9 @@
        define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
 
        function purge_old_posts() {
-               if (PURGE_OLD_DAYS) {
+               if (PURGE_OLD_DAYS > 0) {
                        $result = pg_query("DELETE FROM ttrss_entries WHERE
-                               date_entered < NOW() - INTERVAL '30 days'");
+                               date_entered < NOW() - INTERVAL '".PURGE_OLD_DAYS." days'");
                }
        }