A free, self-hostable news aggregator…
Make auto-update server URL alterable
Marien Fressinaud697817eebf75
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 14b6a18ce..828884546 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -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-betadiff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.phpindex 0dc7ceab2..d0f0bd68b 100755--- a/app/Controllers/configureController.php+++ b/app/Controllers/configureController.php@@ -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();diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.phpindex 5c8a1ce29..250c14c39 100644--- a/app/Models/ConfigurationSetter.php+++ b/app/Models/ConfigurationSetter.php@@ -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;+ }}diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.phpindex e1fa5d141..342ac7ccd 100644--- a/app/i18n/cz/admin.php+++ b/app/i18n/cz/admin.php@@ -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 translatediff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.phpindex 395b51acf..6e6cc0956 100644--- a/app/i18n/de/admin.php+++ b/app/i18n/de/admin.php@@ -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 translatediff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.phpindex 6edb38cf0..a58771edf 100644--- a/app/i18n/en/admin.php+++ b/app/i18n/en/admin.php@@ -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',diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.phpindex e73622577..f4f267306 100644--- a/app/i18n/fr/admin.php+++ b/app/i18n/fr/admin.php@@ -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',diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.phpindex cb9a55c0b..94b2d6762 100644--- a/app/i18n/it/admin.php+++ b/app/i18n/it/admin.php@@ -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',diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.phpindex 5c6a14fda..c3a3062b9 100644--- a/app/i18n/nl/admin.php+++ b/app/i18n/nl/admin.php@@ -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',diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.phpindex b8467f92f..574f0386b 100644--- a/app/i18n/nl/gen.php+++ b/app/i18n/nl/gen.php@@ -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',diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtmlindex 9406c34d6..4af669eb0 100644--- a/app/views/configure/system.phtml+++ b/app/views/configure/system.phtml@@ -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>