mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-26 13:08:38 -04:00
Merge pull request #1024 from marienfressinaud/feature/make-url-auto-update-in-config
Move auto-update server URL alterable (config)
This commit is contained in:
commit
455e488e79
14 files changed
+42
-4
No files matched your search
@@ -11,6 +11,8 @@
|
||||
* Visual alert on categories containing feeds in error [#984](https://github.com/FreshRSS/FreshRSS/pull/984)
|
||||
* I18n
|
||||
* Italian [#1003](https://github.com/FreshRSS/FreshRSS/issues/1003)
|
||||
* Misc.
|
||||
* Make auto-update server URL alterable [#1019](https://github.com/FreshRSS/FreshRSS/issues/1019)
|
||||
|
||||
|
||||
## 2015-09-12 FreshRSS 1.1.3-beta
|
||||
|
||||
@@ -317,6 +317,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
|
||||
$limits['max_categories'] = Minz_Request::param('max-categories', 16384);
|
||||
FreshRSS_Context::$system_conf->limits = $limits;
|
||||
FreshRSS_Context::$system_conf->title = Minz_Request::param('instance-name', 'FreshRSS');
|
||||
FreshRSS_Context::$system_conf->auto_update_url = Minz_Request::param('auto-update-url', false);
|
||||
FreshRSS_Context::$system_conf->save();
|
||||
|
||||
invalidateHttpCache();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -378,4 +378,12 @@ class FreshRSS_ConfigurationSetter {
|
||||
private function _unsafe_autologin_enabled(&$data, $value) {
|
||||
$data['unsafe_autologin_enabled'] = $this->handleBool($value);
|
||||
}
|
||||
|
||||
private function _auto_update_url(&$data, $value) {
|
||||
if (!$value) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data['auto_update_url'] = $value;
|
||||
}
|
||||
}
|
||||
@@ -148,6 +148,7 @@ return array(
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'System configuration', // @todo translate
|
||||
'auto-update-url' => 'Auto-update server URL', // @todo translate
|
||||
'instance-name' => 'Instance name', // @todo translate
|
||||
'max-categories' => 'Categories per user limit', // @todo translate
|
||||
'max-feeds' => 'Feeds per user limit', // @todo translate
|
||||
|
||||
@@ -148,6 +148,7 @@ return array(
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'System configuration', // @todo translate
|
||||
'auto-update-url' => 'Auto-update server URL', // @todo translate
|
||||
'instance-name' => 'Instance name', // @todo translate
|
||||
'max-categories' => 'Categories per user limit', // @todo translate
|
||||
'max-feeds' => 'Feeds per user limit', // @todo translate
|
||||
|
||||
@@ -148,6 +148,7 @@ return array(
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'System configuration',
|
||||
'auto-update-url' => 'Auto-update server URL',
|
||||
'instance-name' => 'Instance name',
|
||||
'max-categories' => 'Categories per user limit',
|
||||
'max-feeds' => 'Feeds per user limit',
|
||||
|
||||
@@ -148,6 +148,7 @@ return array(
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'Configuration du système',
|
||||
'auto-update-url' => 'URL du service de mise à jour',
|
||||
'instance-name' => 'Nom de l’instance',
|
||||
'max-categories' => 'Limite de catégories par utilisateur',
|
||||
'max-feeds' => 'Limite de flux par utilisateur',
|
||||
|
||||
@@ -148,6 +148,7 @@ return array(
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'Configurazione di sistema',
|
||||
'auto-update-url' => 'Auto-update server URL', // @todo translate
|
||||
'instance-name' => 'Nome istanza',
|
||||
'max-categories' => 'Limite categorie per utente',
|
||||
'max-feeds' => 'Limite feeds per utente',
|
||||
|
||||
@@ -146,6 +146,17 @@ return array(
|
||||
'title' => 'Statistieken',
|
||||
'top_feed' => 'Top tien feeds',
|
||||
),
|
||||
'system' => array(
|
||||
'_' => 'System configuration', // @todo translate
|
||||
'auto-update-url' => 'Auto-update server URL', // @todo translate
|
||||
'instance-name' => 'Instance name', // @todo translate
|
||||
'max-categories' => 'Categories per user limit', // @todo translate
|
||||
'max-feeds' => 'Feeds per user limit', // @todo translate
|
||||
'registration' => array(
|
||||
'help' => '0 means that there is no account limit', // @todo translate
|
||||
'number' => 'Max number of accounts', // @todo translate
|
||||
),
|
||||
),
|
||||
'update' => array(
|
||||
'_' => 'Versie controle',
|
||||
'apply' => 'Toepassen',
|
||||
|
||||
@@ -139,6 +139,7 @@ return array(
|
||||
'sharing' => 'Delen',
|
||||
'shortcuts' => 'Snelle toegang',
|
||||
'stats' => 'Statistieken',
|
||||
'system' => 'System configuration', // @todo translate
|
||||
'update' => 'Versie controle',
|
||||
'user_management' => 'Beheer gebruikers',
|
||||
'user_profile' => 'Profiel',
|
||||
|
||||
@@ -9,7 +9,14 @@
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="instance-name"><?php echo _t('admin.system.instance-name'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input type="text" id="max-feeds" name="instance-name" value="<?php echo FreshRSS_Context::$system_conf->title; ?>" min="1" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->title; ?>"/>
|
||||
<input type="text" class="extend" id="instance-name" name="instance-name" value="<?php echo FreshRSS_Context::$system_conf->title; ?>" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->title; ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="auto-update-url"><?php echo _t('admin.system.auto-update-url'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?php echo FreshRSS_Context::$system_conf->auto_update_url; ?>" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->auto_update_url; ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
|
||||
|
||||
Reference in new issue
Block a user