]> git.wh0rd.org - tt-rss.git/blobdiff - classes/pref/prefs.php
support disabling of e-mail digests entirely
[tt-rss.git] / classes / pref / prefs.php
index 7a3b363f709d69427e1a0a079097334b2121865c..0ae3e1bbb795a84b2b53a5b35eb10eb79971c019 100644 (file)
@@ -162,7 +162,7 @@ class Pref_Prefs extends Handler_Protected {
 
                $prefs_blacklist = array("ALLOW_DUPLICATE_POSTS", "STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES",
                        "SORT_HEADLINES_BY_FEED_DATE", "DEFAULT_ARTICLE_LIMIT",
-                       "FEEDS_SORT_BY_UNREAD");
+                       "FEEDS_SORT_BY_UNREAD", "CDM_EXPANDED");
 
                /* "FEEDS_SORT_BY_UNREAD", "HIDE_READ_FEEDS", "REVERSE_HEADLINES" */
 
@@ -172,6 +172,7 @@ class Pref_Prefs extends Handler_Protected {
                                        "DEFAULT_UPDATE_INTERVAL", "USER_TIMEZONE", "SORT_HEADLINES_BY_FEED_DATE",
                                        "SSL_CERT_SERIAL", "DIGEST_PREFERRED_TIME");
 
+               $digest_options = array("DIGEST_ENABLE", "DIGEST_CATCHUP", "DIGEST_PREFERRED_TIME");
 
                $_SESSION["prefs_op_result"] = "";
 
@@ -502,6 +503,10 @@ class Pref_Prefs extends Handler_Protected {
                                continue;
                        }
 
+                       /* Hide options from the user that are disabled in config.php. */
+                       if (DIGEST_SUBJECT === false && in_array($pref_name, $digest_options))
+                               continue;
+
                        if ($active_section != $line["section_id"]) {
 
                                if ($active_section != "") {
@@ -1089,7 +1094,7 @@ class Pref_Prefs extends Handler_Protected {
 
                print "<div class='dlgButtons'>
                        <div style='float : left'>
-                       <button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('profileEditDlg').removeSelected()\">".
+                       <button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('profileEditDlg').removeSelected()\">".
                        __('Remove selected profiles')."</button>
                        <button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('profileEditDlg').activateProfile()\">".
                        __('Activate profile')."</button>