From: Andrew Dolgov Date: Fri, 2 Dec 2005 20:07:47 +0000 (+0100) Subject: option GLOBAL_ENABLE_LABELS restricts labels globally X-Git-Tag: 1.1~14 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cfaba6df12647fef06658f123a73819dc958789b;p=tt-rss.git option GLOBAL_ENABLE_LABELS restricts labels globally --- diff --git a/backend.php b/backend.php index fd265999..93199e43 100644 --- a/backend.php +++ b/backend.php @@ -272,7 +272,7 @@ print ""; } - 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 0686b931..851beaeb 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. + ?> diff --git a/prefs.php b/prefs.php index 4be862d1..8c0d29c3 100644 --- a/prefs.php +++ b/prefs.php @@ -83,7 +83,7 @@ onclick="selectTab('feedConfig')"> - +