Skip to content

Commit

Permalink
new global option: ENABLE_FEED_BROWSER
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Dolgov committed Jan 12, 2006
1 parent dbf4a4c commit e2f728b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
21 changes: 17 additions & 4 deletions backend.php
Expand Up @@ -1567,6 +1567,11 @@ class=\"feedCheckBox\" id=\"RCHK-$id\">
}

if ($subop == "browse") {

if (!ENABLE_FEED_BROWSER) {
print "Feed browser is administratively disabled.";
return;
}

print "<div class=\"infoBoxContents\">";

Expand Down Expand Up @@ -2057,10 +2062,13 @@ class=\"feedCheckBox\" id=\"RCHK-$id\">
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\">
Expand Down Expand Up @@ -3984,6 +3992,11 @@ class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">&nbsp;...</li>";

if ($op == "pref-feed-browser") {

if (!ENABLE_FEED_BROWSER) {
print "Feed browser is administratively disabled.";
return;
}

$subop = $_REQUEST["subop"];

if ($subop == "details") {
Expand Down
3 changes: 3 additions & 0 deletions config.php-dist
Expand Up @@ -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
?>
2 changes: 2 additions & 0 deletions prefs.php
Expand Up @@ -87,8 +87,10 @@
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')) { ?>
Expand Down

0 comments on commit e2f728b

Please sign in to comment.