diff options
author | Andrew Dolgov <[email protected]> | 2005-12-02 21:07:47 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-12-02 21:07:47 +0100 |
commit | cfaba6df12647fef06658f123a73819dc958789b (patch) | |
tree | 298e178b3fe1711bec2be242735d5b280d85b663 | |
parent | c868b15476c5e010367cab3f588cee636b3b136c (diff) |
option GLOBAL_ENABLE_LABELS restricts labels globally
-rw-r--r-- | backend.php | 6 | ||||
-rw-r--r-- | config.php-dist | 3 | ||||
-rw-r--r-- | prefs.php | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/backend.php b/backend.php index fd2659996..93199e43e 100644 --- a/backend.php +++ b/backend.php @@ -272,7 +272,7 @@ print "</li></ul>"; } - if (get_pref($link, 'ENABLE_LABELS')) { + if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { $result = db_query($link, "SELECT id,sql_exp,description FROM ttrss_labels WHERE owner_uid = '$owner_uid' ORDER by description"); @@ -2203,6 +2203,10 @@ if ($op == "pref-labels") { + if (!GLOBAL_ENABLE_LABELS) { + return; + } + $subop = $_GET["subop"]; if ($subop == "test") { diff --git a/config.php-dist b/config.php-dist index 0686b9312..851beaeb0 100644 --- a/config.php-dist +++ b/config.php-dist @@ -45,4 +45,7 @@ // makes UI more responsive, but eats server memory. // If you experience weird feedlist refresh bugs, disable this option. + define('GLOBAL_ENABLE_LABELS', true); + // Labels are a security risk, so this option can globally disable them for all users. + ?> @@ -83,7 +83,7 @@ onclick="selectTab('feedConfig')"> <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering" onclick="selectTab('filterConfig')"> - <? if (get_pref($link, 'ENABLE_LABELS')) { ?> + <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?> <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor" onclick="selectTab('labelConfig')"> <? } ?> |