]> git.wh0rd.org - tt-rss.git/commitdiff
No more "tunables.php" defaults dumped into "functions.php"
authorBarak Korren <barak.korren@gmail.com>
Tue, 2 Apr 2013 18:29:10 +0000 (21:29 +0300)
committerBarak Korren <barak.korren@gmail.com>
Tue, 2 Apr 2013 18:29:10 +0000 (21:29 +0300)
include/functions.php
tunables.php [deleted file]

index d99f6a64b074ae14cfbfd859402c086db7b655c1..ee575568ac1a6f9ed846bb6123db31d092debc4c 100644 (file)
         */
        function define_default($name, $value) {
                // Note: performence freaks should define everything in 
-               // tunables.php in config.php becasue if will make defined() 
-               // run much faster, see 'tris+php at tfconsulting dot com dot 
-               // au' comment here: 
+               // config.php becasue if will make defined() run much faster, 
+               // see comment by 'tris+php at tfconsulting dot com dot au' 
+               // here: 
                // http://www.php.net/manual/en/function.defined.php#89886
                defined($name) or define($name, $value);
        }
 
-       // Require tunables.php to define tunable constants (That may have 
-       // already been denied in config.php)
-       require_once 'tunables.php';
+       ///// Some defaults that you can override in config.php //////
+
+       define_default('FEED_FETCH_TIMEOUT', 45);
+       // How may seconds to wait for response when requesting feed from a site
+       define_default('FEED_FETCH_NO_CACHE_TIMEOUT', 15);
+       // How may seconds to wait for response when requesting feed from a
+       // site when that feed wasn't cached before
+       define_default('FILE_FETCH_TIMEOUT', 45);
+       // Default timeout when fetching files from remote sites
+       define_default('FILE_FETCH_CONNECT_TIMEOUT', 15);
+       // How many seconds to wait for initial response from website when
+       // fetching files from remote sites
 
        if (DB_TYPE == "pgsql") {
                define('SUBSTRING_FOR_DATE', 'SUBSTRING_FOR_DATE');
diff --git a/tunables.php b/tunables.php
deleted file mode 100644 (file)
index 6de0e27..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php 
-       // this file contains default values for various setting that can be 
-       // overridden in config.php
-       // It shoule always be "require()"-d after config.php to allow 
-       // overriding, so please do not "require()" this file directly, it is 
-       // alrady properly included from functions.php
-
-       // **************************************
-       // *** Update proces tuning settings  ***
-       // **************************************
-
-       define_default('FEED_FETCH_TIMEOUT', 45);
-       // How may seconds to wait for response when requesting feed from a site
-       // You may need to decease this if you see errors like "MySQL server
-       // has gone away" pop up in your feed update logs after fetching feeds
-       // from slow websites
-
-       define_default('FEED_FETCH_NO_CACHE_TIMEOUT', 15);
-       // How may seconds to wait for response when requesting feed from a
-       // site when that feed wasn't cached before
-
-       define_default('FILE_FETCH_TIMEOUT', 45);
-       // Default timeout when fetching files from remote sites
-
-       define_default('FILE_FETCH_CONNECT_TIMEOUT', 15);
-       // How many seconds to wait for initial response from website when
-       // fetching files from remote sites
-?>