aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-11-02 20:20:40 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-11-02 21:11:23 +0100
commitbb0556543d3d5d54832ea6d81372587b88062a5b (patch)
treecccad2f4e3503cd96392731115105073b96deb67
parenta74eac88d8ccd38ff700e12cc42410e4780349a0 (diff)
Move auto-update server URL in configuration
Fix https://github.com/FreshRSS/FreshRSS/issues/1019
-rw-r--r--app/Controllers/updateController.php5
-rw-r--r--constants.php1
-rw-r--r--data/config.default.php3
3 files changed, 6 insertions, 3 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index 84a33fe85..64c984b04 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -53,7 +53,8 @@ class FreshRSS_update_Controller extends Minz_ActionController {
return;
}
- $c = curl_init(FRESHRSS_UPDATE_WEBSITE);
+ $auto_update_url = FreshRSS_Context::$system_conf->auto_update_url . '?v=' . FRESHRSS_VERSION;
+ $c = curl_init($auto_update_url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
@@ -70,7 +71,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
$this->view->message = array(
'status' => 'bad',
'title' => _t('gen.short.damn'),
- 'body' => _t('feedback.update.server_not_found', FRESHRSS_UPDATE_WEBSITE)
+ 'body' => _t('feedback.update.server_not_found', $auto_update_url)
);
return;
}
diff --git a/constants.php b/constants.php
index 0035c259b..1c50d4a83 100644
--- a/constants.php
+++ b/constants.php
@@ -1,7 +1,6 @@
<?php
define('FRESHRSS_VERSION', '1.1.4-dev');
define('FRESHRSS_WEBSITE', 'http://freshrss.org');
-define('FRESHRSS_UPDATE_WEBSITE', 'https://update.freshrss.org?v=' . FRESHRSS_VERSION);
define('FRESHRSS_WIKI', 'http://doc.freshrss.org');
// PHP text output compression http://php.net/ob_gzhandler (better to do it at Web server level)
diff --git a/data/config.default.php b/data/config.default.php
index 8eccee8a5..174592a21 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -18,6 +18,9 @@ return array(
# https://freshrss.example.net/
'base_url' => '',
+ # Specify address of the FreshRSS auto-update server.
+ 'auto_update_url' => 'https://update.freshrss.org',
+
# Natural language of the user interface, e.g. `en`, `fr`.
'language' => 'en',