Browse Source

add config option CHECK_FOR_UPDATES

Andrew Dolgov 4 years ago
parent
commit
4ca621a360
3 changed files with 6 additions and 3 deletions
  1. 3 0
      config.php-dist
  2. 1 1
      include/functions2.php
  3. 2 2
      include/sanity_config.php

+ 3 - 0
config.php-dist

@@ -177,6 +177,9 @@
 	// *** Other settings (less important) ***
 	// ***************************************
 
+	define('CHECK_FOR_UPDATES', true);
+	// Check for updates automatically if running Git version
+ 
 	define('DETECT_ARTICLE_LANGUAGE', false);
 	// Detect article language when updating feeds, presently this is only
 	// used for hyphenation. This may increase amount of CPU time used by 

+ 1 - 1
include/functions2.php

@@ -242,7 +242,7 @@
 		$data['reload_on_ts_change'] = !defined('_NO_RELOAD_ON_TS_CHANGE');
 
 
-		if ($_SESSION["last_version_check"] + 86400 + rand(-1000, 1000) < time()) {
+		if (CHECK_FOR_UPDATES && $_SESSION["last_version_check"] + 86400 + rand(-1000, 1000) < time()) {
 			$update_result = @check_for_update();
 
 			$data["update_result"] = $update_result;

File diff suppressed because it is too large
+ 2 - 2
include/sanity_config.php