]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc interface cleanups, only allow daemon to start when ENABLE_UPDATE_DAEMON is...
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 07:50:35 +0000 (08:50 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 07:50:35 +0000 (08:50 +0100)
backend.php
tt-rss.js
update_daemon.php

index 1a741f8971fb9f2f365ea21cc2573126e6f015b7..d1ff69142ee71fecc1f332a0a14f14cb3625ed8b 100644 (file)
@@ -61,6 +61,7 @@
                }  
 
                setcookie('ttrss_vf_refresh', FEEDS_FRAME_REFRESH);
+               setcookie('ttrss_vf_daemon', ENABLE_UPDATE_DAEMON);
        }
 
        $fetch = $_GET["fetch"];
index 0e71c0ecd97b5fe4fbc343402ad5680840a936fc..4b1b29b144feaf0e36b54240b1fb0917ef82d41a 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -5,7 +5,7 @@ var display_tags = false;
 var global_unread = -1;
 var active_title_text = "";
 var current_subtitle = "";
-
+var daemon_enabled = false;
 var _qfd_deleted_feed = 0;
 
 /*@cc_on @*/
@@ -123,9 +123,11 @@ function refetch_callback() {
                        var f_document = window.frames["feeds-frame"].document;
 
                        parse_counters(reply, f_document, window);
-       
-                       updateTitle("");
-                       notify("All feeds updated.");
+
+                       if (!daemon_enabled) {
+                               updateTitle("");
+                               notify("All feeds updated.");
+                       }
                } catch (e) {
                        exception_error("refetch_callback", e);
                        updateTitle("");
@@ -167,11 +169,10 @@ function backend_sanity_check_callback() {
 
 function scheduleFeedUpdate(force) {
 
-       notify("Updating feeds, please wait.");
-
-//     document.title = "Tiny Tiny RSS - Updating...";
-
-       updateTitle("Updating");
+       if (!daemon_enabled) {
+               notify("Updating feeds, please wait.");
+               updateTitle("Updating");
+       }
 
        var query_str = "backend.php?op=rpc&subop=";
 
@@ -402,6 +403,8 @@ function init_second_stage() {
 
                dropboxSelect(viewbox, getCookie("ttrss_vf_vmode"));
                dropboxSelect(limitbox, getCookie("ttrss_vf_limit"));
+
+               daemon_enabled = getCookie("ttrss_vf_daemon");
        
        } catch (e) {
                exception_error("init_second_stage", e);
index be118711bcbc3b5dce388d9bf5afc95d470c35e7..b9d5d571aca782e6261db8f68221a5598fb92039 100644 (file)
 
        require_once "sanity_check.php";
        require_once "config.php";
+
+       if (!ENABLE_UPDATE_DAEMON) {
+               die("Please enable option ENABLE_UPDATE_DAEMON in config.php");
+       }
+       
        require_once "db.php";
        require_once "db-prefs.php";
        require_once "functions.php";