]> git.wh0rd.org - tt-rss.git/commitdiff
new global option: ENABLE_FEED_BROWSER
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 12 Jan 2006 13:50:53 +0000 (14:50 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 12 Jan 2006 13:50:53 +0000 (14:50 +0100)
backend.php
config.php-dist
prefs.php

index 2f16ed81a2f6ddcd73a0db9aeb7d97527ffdf1eb..f70bc8e9e33bdbc07d46ade9a02613e696761e64 100644 (file)
                }               
 
                if ($subop == "browse") {
+
+                       if (!ENABLE_FEED_BROWSER) {
+                               print "Feed browser is administratively disabled.";
+                               return;
+                       }
                        
                        print "<div class=\"infoBoxContents\">";
 
                                onchange=\"javascript:addFeed()\"
                                size=\"40\">
                                <input type=\"submit\" class=\"button\"
-                               onclick=\"javascript:addFeed()\" value=\"Add feed\">
-                               &nbsp;
-                               (<a href='javascript:browseFeeds()'>Top 50</a>)
-                       </td><td align='right'>
+                               onclick=\"javascript:addFeed()\" value=\"Add feed\">";
+
+               if (ENABLE_FEED_BROWSER) {
+                       print "&nbsp;(<a href='javascript:browseFeeds()'>Top 50</a>)";
+               }
+               
+               print "</td><td align='right'>
                                <input id=\"feed_search\" size=\"20\"  
                                onchange=\"javascript:updateFeedList()\"
                                value=\"$feed_search\">
 
        if ($op == "pref-feed-browser") {
 
+               if (!ENABLE_FEED_BROWSER) {
+                       print "Feed browser is administratively disabled.";
+                       return;
+               }
+
                $subop = $_REQUEST["subop"];
 
                if ($subop == "details") {
index 5935dd1261d1b7dc36de01f4ab646bd9568deb4d..95086be7e2b918852011bc1dc236dd0f8246d5d2 100644 (file)
@@ -64,6 +64,9 @@
        
        define('MAIL_FROM', 'TT-RSS Daemon <noreply@ttrss.your-shiny-host.org>');
        // Pretty obvious, I suppose.
+
+       define('ENABLE_FEED_BROWSER', true);
+       // Enable or disable local feed browser
        
        // vim:ft=php
 ?>
index c2492f1a160a98907bd91fe02682f96c14dd9f3f..71be40338c65b810c5bde30e2653de9205e99485 100644 (file)
--- a/prefs.php
+++ b/prefs.php
                        onclick="selectTab('genConfig')">
                <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration"
                        onclick="selectTab('feedConfig')">
+               <? if (ENABLE_FEED_BROWSER) { ?>
                <input id="feedBrowserTab" class="prefsTab" type="submit" value="Feed Browser"
                        onclick="selectTab('feedBrowser')">
+               <? } ?>
                <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
                        onclick="selectTab('filterConfig')">
                <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?>