From 079150eee4eebce3549c3d7db84dd0180bdd11e7 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 3 Jul 2015 23:47:18 +0200 Subject: Updated log visibility In particular, ensure that ERROR is only used for errors that may affect FreshRSS integrity, and ensure that feed errors are visible also in production, i.e. visibility of WARNING https://github.com/FreshRSS/FreshRSS/issues/885 https://github.com/FreshRSS/FreshRSS/issues/884 --- app/Controllers/updateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers/updateController.php') diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 4797a3486..84a33fe85 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -63,7 +63,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { curl_close($c); if ($c_status !== 200) { - Minz_Log::error( + Minz_Log::warning( 'Error during update (HTTP code ' . $c_status . '): ' . $c_error ); -- cgit v1.2.3 From bb0556543d3d5d54832ea6d81372587b88062a5b Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 2 Nov 2015 20:20:40 +0100 Subject: Move auto-update server URL in configuration Fix https://github.com/FreshRSS/FreshRSS/issues/1019 --- app/Controllers/updateController.php | 5 +++-- constants.php | 1 - data/config.default.php | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'app/Controllers/updateController.php') 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 @@ '', + # 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', -- cgit v1.2.3 From 21e63595083d556bd4a6ff56c4ccaab5cd318dd4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 5 Nov 2016 15:08:10 +0100 Subject: Add compatibility with git in Web update https://github.com/FreshRSS/FreshRSS/issues/907 https://github.com/FreshRSS/FreshRSS/issues/1355 --- CHANGELOG.md | 3 + README.fr.md | 4 +- README.md | 2 +- app/Controllers/updateController.php | 159 ++++++++++++++++++++++++----------- 4 files changed, 118 insertions(+), 50 deletions(-) (limited to 'app/Controllers/updateController.php') diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ec29aed..140c8cfaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 2016-xx-xx FreshRSS 1.7.0-dev +* Features + * Add git compatibility in Web update system [#1357](https://github.com/FreshRSS/FreshRSS/issues/1357) + * Requires that the initial installation is done with git ## 2016-11-02 FreshRSS 1.6.1 diff --git a/README.fr.md b/README.fr.md index 2587c2d8f..afa8fa1ce 100644 --- a/README.fr.md +++ b/README.fr.md @@ -23,7 +23,7 @@ Voir la [liste des versions](../../releases). * Pour ceux qui veulent bien aider à tester ou déveloper les dernières fonctionnalités, [la branche dev](https://github.com/FreshRSS/FreshRSS/tree/dev) vous ouvre les bras ! # Avertissements -Cette application a été développée pour s’adapter principalement à des besoins personnels, et aucune garantie n'est fournie. +Cette application a été développée pour s’adapter principalement à des besoins personnels, et aucune garantie n’est fournie. Les demandes de fonctionnalités, rapports de bugs, et autres contributions sont les bienvenues. Privilégiez pour cela des [demandes sur GitHub](https://github.com/FreshRSS/FreshRSS/issues). Nous sommes une communauté amicale. @@ -85,7 +85,7 @@ sudo git checkout -b dev origin/dev # Mettre les droits d’accès pour le serveur Web sudo chown -R :www-data . && sudo chmod -R g+r . && sudo chmod -R g+w ./data/ -# Si vous souhaitez permettre les mises à jour par l'interface Web (inutile pour les mises à jour par git) +# Si vous souhaitez permettre les mises à jour par l’interface Web sudo chmod -R g+w . # Publier FreshRSS dans votre répertoire HTML public diff --git a/README.md b/README.md index cfb7b6769..ebf1e3c5f 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ sudo git checkout -b dev origin/dev # Set the rights so that your Web server can access the files sudo chown -R :www-data . && sudo chmod -R g+r . && sudo chmod -R g+w ./data/ -# If you would like to allow Web updates (not needed for updates with git) +# If you would like to allow updates from the Web interface sudo chmod -R g+w . # Publish FreshRSS in your public HTML directory diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 64c984b04..8f939dbdb 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -2,6 +2,45 @@ class FreshRSS_update_Controller extends Minz_ActionController { + public static function isGit() { + return is_dir(FRESHRSS_PATH . '/.git/'); + } + + public static function hasGitUpdate() { + $cwd = getcwd(); + chdir(FRESHRSS_PATH); + $output = array(); + try { + exec('git fetch', $output, $return); + if ($return == 0) { + exec('git status -sb --porcelain remote', $output, $return); + } else { + $line = is_array($output) ? implode('; ', $output) : '' . $output; + Minz_Log::warning('git fetch warning:' . $line); + } + } catch (Exception $e) { + Minz_Log::warning('git fetch error:' . $e->getMessage()); + } + chdir($cwd); + $line = is_array($output) ? implode('; ', $output) : '' . $output; + return strpos($line, '[behind') !== false; + } + + public static function gitPull() { + $cwd = getcwd(); + chdir(FRESHRSS_PATH); + $output = array(); + $return = 1; + try { + exec('git pull --ff-only', $output, $return); + } catch (Exception $e) { + Minz_Log::warning('git pull error:' . $e->getMessage()); + } + chdir($cwd); + $line = is_array($output) ? implode('; ', $output) : '' . $output; + return $return == 0 ? true : 'Git error: ' . $line; + } + public function firstAction() { if (!FreshRSS_Auth::hasAccess('admin')) { Minz_Error::error(403); @@ -20,7 +59,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { public function indexAction() { Minz_View::prependTitle(_t('admin.update.title') . ' · '); - if (file_exists(UPDATE_FILENAME) && !is_writable(FRESHRSS_PATH)) { + if (!is_writable(FRESHRSS_PATH)) { $this->view->message = array( 'status' => 'bad', 'title' => _t('gen.short.damn'), @@ -53,49 +92,65 @@ class FreshRSS_update_Controller extends Minz_ActionController { return; } - $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); - $result = curl_exec($c); - $c_status = curl_getinfo($c, CURLINFO_HTTP_CODE); - $c_error = curl_error($c); - curl_close($c); - - if ($c_status !== 200) { - Minz_Log::warning( - 'Error during update (HTTP code ' . $c_status . '): ' . $c_error - ); + $script = ''; + $version = ''; - $this->view->message = array( - 'status' => 'bad', - 'title' => _t('gen.short.damn'), - 'body' => _t('feedback.update.server_not_found', $auto_update_url) - ); - return; - } - - $res_array = explode("\n", $result, 2); - $status = $res_array[0]; - if (strpos($status, 'UPDATE') !== 0) { - $this->view->message = array( - 'status' => 'bad', - 'title' => _t('gen.short.damn'), - 'body' => _t('feedback.update.none') - ); + if (self::isGit()) { + if (self::hasGitUpdate()) { + $version = 'git'; + } else { + $this->view->message = array( + 'status' => 'bad', + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.none') + ); + @touch(join_path(DATA_PATH, 'last_update.txt')); + return; + } + } else { + $auto_update_url = FreshRSS_Context::$system_conf->auto_update_url . '?v=' . FRESHRSS_VERSION; + Minz_Log::debug('HTTP GET ' . $auto_update_url); + $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); + $result = curl_exec($c); + $c_status = curl_getinfo($c, CURLINFO_HTTP_CODE); + $c_error = curl_error($c); + curl_close($c); + + if ($c_status !== 200) { + Minz_Log::warning( + 'Error during update (HTTP code ' . $c_status . '): ' . $c_error + ); + + $this->view->message = array( + 'status' => 'bad', + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.server_not_found', $auto_update_url) + ); + return; + } - @touch(join_path(DATA_PATH, 'last_update.txt')); + $res_array = explode("\n", $result, 2); + $status = $res_array[0]; + if (strpos($status, 'UPDATE') !== 0) { + $this->view->message = array( + 'status' => 'bad', + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.none') + ); + @touch(join_path(DATA_PATH, 'last_update.txt')); + return; + } - return; + $script = $res_array[1]; + $version = explode(' ', $status, 2); + $version = $version[1]; } - $script = $res_array[1]; if (file_put_contents(UPDATE_FILENAME, $script) !== false) { - $version = explode(' ', $status, 2); - $version = $version[1]; @file_put_contents(join_path(DATA_PATH, 'last_update.txt'), $version); - Minz_Request::forward(array('c' => 'update'), true); } else { $this->view->message = array( @@ -111,10 +166,13 @@ class FreshRSS_update_Controller extends Minz_ActionController { Minz_Request::forward(array('c' => 'update'), true); } - require(UPDATE_FILENAME); - if (Minz_Request::param('post_conf', false)) { - $res = do_post_update(); + if (self::isGit()) { + $res = !self::hasGitUpdate(); + } else { + require(UPDATE_FILENAME); + $res = do_post_update(); + } Minz_ExtensionManager::callHook('post_update'); @@ -126,14 +184,21 @@ class FreshRSS_update_Controller extends Minz_ActionController { Minz_Request::bad(_t('feedback.update.error', $res), array('c' => 'update', 'a' => 'index')); } - } - - if (Minz_Request::isPost()) { - save_info_update(); - } + } else { + $res = false; - if (!need_info_update()) { - $res = apply_update(); + if (self::isGit()) { + $res = self::gitPull(); + } else { + if (Minz_Request::isPost()) { + save_info_update(); + } + if (!need_info_update()) { + $res = apply_update(); + } else { + return; + } + } if ($res === true) { Minz_Request::forward(array( -- cgit v1.2.3 From 59d6f3593cb1dead402813207ab8d860ea684ddc Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Thu, 23 Feb 2017 21:22:56 +0100 Subject: Add config option to disable and hide self-update --- app/Controllers/updateController.php | 2 +- app/layout/aside_configure.phtml | 2 ++ app/layout/header.phtml | 2 ++ data/config.default.php | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) (limited to 'app/Controllers/updateController.php') diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 8f939dbdb..b4e8a0bff 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -162,7 +162,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { } public function applyAction() { - if (!file_exists(UPDATE_FILENAME) || !is_writable(FRESHRSS_PATH)) { + if (!file_exists(UPDATE_FILENAME) || !is_writable(FRESHRSS_PATH) || Minz_Configuration::get('system')->disable_update) { Minz_Request::forward(array('c' => 'update'), true); } diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index d956ec21f..94f5b1f6c 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -41,9 +41,11 @@ Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>"> + disable_update) { ?>
  • + diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 238c664b0..e589ed7ef 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -71,8 +71,10 @@ if (FreshRSS_Auth::accessNeedsAction()) {
  • + disable_update) { ?>
  • +
  • diff --git a/data/config.default.php b/data/config.default.php index 433207a9c..748df1884 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -146,4 +146,7 @@ return array( # List of enabled FreshRSS extensions. 'extensions_enabled' => array(), + + # Disable self-update, + 'disable_update' => false, ); -- cgit v1.2.3 From 9ce0bca45ff01be50bd254a85b0f51eff429c5da Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 13 Apr 2017 22:47:19 +0200 Subject: fix: Fix update via ZIP archive Code from the update server was not loaded anymore before the update process. This commit brings back missing `require`. --- CHANGELOG.md | 1 + app/Controllers/updateController.php | 1 + 2 files changed, 2 insertions(+) (limited to 'app/Controllers/updateController.php') diff --git a/CHANGELOG.md b/CHANGELOG.md index 504886a23..3b576aac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * (Require manual update for existing installations) * Do not require PHP extension `fileinfo` for favicons [#1461](https://github.com/FreshRSS/FreshRSS/issues/1461) * Fix UI lowest subscription popup hidden [#1479](https://github.com/FreshRSS/FreshRSS/issues/1479) + * Fix update system via ZIP archive [#1498](https://github.com/FreshRSS/FreshRSS/pull/1498) * I18n * Improve English [#1465](https://github.com/FreshRSS/FreshRSS/pull/1465) * Misc. diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index b4e8a0bff..35c7d1124 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -190,6 +190,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { if (self::isGit()) { $res = self::gitPull(); } else { + require(UPDATE_FILENAME); if (Minz_Request::isPost()) { save_info_update(); } -- cgit v1.2.3 From 20d1301b462378376ab83bcae56c9065b241e4a5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 25 May 2017 14:27:31 +0200 Subject: Do not require write access to check new version Do not require write access to check if new ZIP version is available https://github.com/FreshRSS/FreshRSS/issues/1450 --- app/Controllers/updateController.php | 30 ++++---- app/i18n/cz/feedback.php | 2 +- app/i18n/de/feedback.php | 2 +- app/i18n/en/feedback.php | 2 +- app/i18n/fr/feedback.php | 2 +- app/i18n/it/feedback.php | 2 +- app/i18n/nl/feedback.php | 2 +- app/i18n/ru/feedback.php | 134 +++++++++++++++++------------------ app/i18n/tr/feedback.php | 2 +- cli/README.md | 2 +- 10 files changed, 91 insertions(+), 89 deletions(-) (limited to 'app/Controllers/updateController.php') diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 35c7d1124..7a8a3d6c0 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -59,24 +59,26 @@ class FreshRSS_update_Controller extends Minz_ActionController { public function indexAction() { Minz_View::prependTitle(_t('admin.update.title') . ' · '); - if (!is_writable(FRESHRSS_PATH)) { - $this->view->message = array( - 'status' => 'bad', - 'title' => _t('gen.short.damn'), - 'body' => _t('feedback.update.file_is_nok', FRESHRSS_PATH) - ); - } elseif (file_exists(UPDATE_FILENAME)) { + if (file_exists(UPDATE_FILENAME)) { // There is an update file to apply! $version = @file_get_contents(join_path(DATA_PATH, 'last_update.txt')); - if (empty($version)) { + if ($version == '') { $version = 'unknown'; } - $this->view->update_to_apply = true; - $this->view->message = array( - 'status' => 'good', - 'title' => _t('gen.short.ok'), - 'body' => _t('feedback.update.can_apply', $version) - ); + if (is_writable(FRESHRSS_PATH)) { + $this->view->update_to_apply = true; + $this->view->message = array( + 'status' => 'good', + 'title' => _t('gen.short.ok'), + 'body' => _t('feedback.update.can_apply', $version), + ); + } else { + $this->view->message = array( + 'status' => 'bad', + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.file_is_nok', $version, FRESHRSS_PATH), + ); + } } } diff --git a/app/i18n/cz/feedback.php b/app/i18n/cz/feedback.php index f2bd87c77..f7b8d8c73 100644 --- a/app/i18n/cz/feedback.php +++ b/app/i18n/cz/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS bude nyní upgradováno na verzi %s.', 'error' => 'Během upgrade došlo k chybě: %s', - 'file_is_nok' => 'Zkontrolujte oprávnění adresáře %s. HTTP server musí mít do tohoto adresáře práva zápisu', + 'file_is_nok' => 'Verzi %s. Zkontrolujte oprávnění adresáře %s. HTTP server musí mít do tohoto adresáře práva zápisu', 'finished' => 'Upgrade hotov!', 'none' => 'Novější verze není k dispozici', 'server_not_found' => 'Nelze nalézt server s instalačním souborem. [%s]', diff --git a/app/i18n/de/feedback.php b/app/i18n/de/feedback.php index 195083b36..e2e9a71ba 100644 --- a/app/i18n/de/feedback.php +++ b/app/i18n/de/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS wird nun auf die Version %s aktualisiert.', 'error' => 'Der Aktualisierungsvorgang stieß auf einen Fehler: %s', - 'file_is_nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses %s. Der HTTP-Server muss Schreibrechte besitzen', + 'file_is_nok' => 'Version %s. Überprüfen Sie die Berechtigungen des Verzeichnisses %s. Der HTTP-Server muss Schreibrechte besitzen', 'finished' => 'Aktualisierung abgeschlossen!', 'none' => 'Keine Aktualisierung zum Anwenden', 'server_not_found' => 'Der Aktualisierungs-Server kann nicht gefunden werden. [%s]', diff --git a/app/i18n/en/feedback.php b/app/i18n/en/feedback.php index 67c5fe97d..334d9a8f5 100644 --- a/app/i18n/en/feedback.php +++ b/app/i18n/en/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS will now be updated to the version %s.', 'error' => 'The update process has encountered an error: %s', - 'file_is_nok' => 'Check permissions on %s directory. HTTP server must have rights to write into', + 'file_is_nok' => 'New version %s available, but check permissions on %s directory. HTTP server must have rights to write into', 'finished' => 'Update completed!', 'none' => 'No update to apply', 'server_not_found' => 'Update server cannot be found. [%s]', diff --git a/app/i18n/fr/feedback.php b/app/i18n/fr/feedback.php index 5966fc3a7..aa19cd02b 100644 --- a/app/i18n/fr/feedback.php +++ b/app/i18n/fr/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS va maintenant être mis à jour vers la version %s.', 'error' => 'La mise à jour a rencontré un problème : %s', - 'file_is_nok' => 'Veuillez vérifier les droits sur le répertoire %s. Le serveur HTTP doit être capable d’écrire dedans', + 'file_is_nok' => 'Nouvelle version %s disponible, mais veuillez vérifier les droits sur le répertoire %s. Le serveur HTTP doit être capable d’écrire dedans', 'finished' => 'La mise à jour est terminée !', 'none' => 'Aucune mise à jour à appliquer', 'server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]', diff --git a/app/i18n/it/feedback.php b/app/i18n/it/feedback.php index 5851cb2e6..8f3cf3ed6 100644 --- a/app/i18n/it/feedback.php +++ b/app/i18n/it/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS verrà aggiornato alla versione %s.', 'error' => 'Il processo di aggiornamento ha riscontrato il seguente errore: %s', - 'file_is_nok' => 'Verifica i permessi della cartella %s. Il server HTTP deve avere i permessi per la scrittura ', + 'file_is_nok' => 'Nuova versione %s, ma verifica i permessi della cartella %s. Il server HTTP deve avere i permessi per la scrittura ', 'finished' => 'Aggiornamento completato con successo!', 'none' => 'Nessun aggiornamento disponibile', 'server_not_found' => 'Server per aggiornamento non disponibile. [%s]', diff --git a/app/i18n/nl/feedback.php b/app/i18n/nl/feedback.php index 386b8d415..3a064eb0a 100644 --- a/app/i18n/nl/feedback.php +++ b/app/i18n/nl/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS word nu vernieud naar versie %s.', 'error' => 'Het vernieuwingsproces kwam een fout tegen: %s', - 'file_is_nok' => 'Controleer permissies op %s map. HTTP server moet rechten hebben om er in te schrijven', + 'file_is_nok' => 'Versie %s. Controleer permissies op %s map. HTTP server moet rechten hebben om er in te schrijven', 'finished' => 'Vernieuwing compleet!', 'none' => 'Geen vernieuwing om toe te passen', 'server_not_found' => 'Vernieuwings server kan niet worden gevonden. [%s]', diff --git a/app/i18n/ru/feedback.php b/app/i18n/ru/feedback.php index e7f6b9f85..ffebd6dc9 100644 --- a/app/i18n/ru/feedback.php +++ b/app/i18n/ru/feedback.php @@ -2,108 +2,108 @@ return array( 'admin' => array( - 'optimization_complete' => 'Optimisation complete', + 'optimization_complete' => 'Optimisation complete', //TODO ), 'access' => array( - 'denied' => 'You don’t have permission to access this page', - 'not_found' => 'You are looking for a page which doesn’t exist', + 'denied' => 'You don’t have permission to access this page', //TODO + 'not_found' => 'You are looking for a page which doesn’t exist', //TODO ), 'auth' => array( 'form' => array( - 'not_set' => 'A problem occured during authentication system configuration. Please retry later.', - 'set' => 'Form is now your default authentication system.', + 'not_set' => 'A problem occured during authentication system configuration. Please retry later.', //TODO + 'set' => 'Form is now your default authentication system.', //TODO ), 'login' => array( - 'invalid' => 'Login is invalid', - 'success' => 'You are connected', + 'invalid' => 'Login is invalid', //TODO + 'success' => 'You are connected', //TODO ), 'logout' => array( - 'success' => 'You are disconnected', + 'success' => 'You are disconnected', //TODO ), - 'no_password_set' => 'Administrator password hasn’t been set. This feature isn’t available.', + 'no_password_set' => 'Administrator password hasn’t been set. This feature isn’t available.', //TODO ), 'conf' => array( - 'error' => 'An error occurred during configuration saving', - 'query_created' => 'Query "%s" has been created.', - 'shortcuts_updated' => 'Shortcuts have been updated', - 'updated' => 'Configuration has been updated', + 'error' => 'An error occurred during configuration saving', //TODO + 'query_created' => 'Query "%s" has been created.', //TODO + 'shortcuts_updated' => 'Shortcuts have been updated', //TODO + 'updated' => 'Configuration has been updated', //TODO ), 'extensions' => array( - 'already_enabled' => '%s is already enabled', + 'already_enabled' => '%s is already enabled', //TODO 'disable' => array( - 'ko' => '%s cannot be disabled. Check FressRSS logs for details.', - 'ok' => '%s is now disabled', + 'ko' => '%s cannot be disabled. Check FressRSS logs for details.', //TODO + 'ok' => '%s is now disabled', //TODO ), 'enable' => array( - 'ko' => '%s cannot be enabled. Check FressRSS logs for details.', - 'ok' => '%s is now enabled', + 'ko' => '%s cannot be enabled. Check FressRSS logs for details.', //TODO + 'ok' => '%s is now enabled', //TODO ), - 'no_access' => 'You have no access on %s', - 'not_enabled' => '%s is not enabled yet', - 'not_found' => '%s does not exist', + 'no_access' => 'You have no access on %s', //TODO + 'not_enabled' => '%s is not enabled yet', //TODO + 'not_found' => '%s does not exist', //TODO ), 'import_export' => array( - 'export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.', - 'feeds_imported' => 'Your feeds have been imported and will now be updated', - 'feeds_imported_with_errors' => 'Your feeds have been imported but some errors occurred', - 'file_cannot_be_uploaded' => 'File cannot be uploaded!', - 'no_zip_extension' => 'ZIP extension is not present on your server.', - 'zip_error' => 'An error occured during ZIP import.', + 'export_no_zip_extension' => 'ZIP extension is not present on your server. Please try to export files one by one.', //TODO + 'feeds_imported' => 'Your feeds have been imported and will now be updated', //TODO + 'feeds_imported_with_errors' => 'Your feeds have been imported but some errors occurred', //TODO + 'file_cannot_be_uploaded' => 'File cannot be uploaded!', //TODO + 'no_zip_extension' => 'ZIP extension is not present on your server.', //TODO + 'zip_error' => 'An error occured during ZIP import.', //TODO ), 'sub' => array( - 'actualize' => 'Actualise', + 'actualize' => 'Actualise', //TODO 'category' => array( - 'created' => 'Category %s has been created.', - 'deleted' => 'Category has been deleted.', - 'emptied' => 'Category has been emptied', - 'error' => 'Category cannot be updated', - 'name_exists' => 'Category name already exists.', - 'no_id' => 'You must precise the id of the category.', - 'no_name' => 'Category name cannot be empty.', - 'not_delete_default' => 'You cannot delete the default category!', - 'not_exist' => 'The category does not exist!', - 'over_max' => 'You have reached your limit of categories (%d)', - 'updated' => 'Category has been updated.', + 'created' => 'Category %s has been created.', //TODO + 'deleted' => 'Category has been deleted.', //TODO + 'emptied' => 'Category has been emptied', //TODO + 'error' => 'Category cannot be updated', //TODO + 'name_exists' => 'Category name already exists.', //TODO + 'no_id' => 'You must precise the id of the category.', //TODO + 'no_name' => 'Category name cannot be empty.', //TODO + 'not_delete_default' => 'You cannot delete the default category!', //TODO + 'not_exist' => 'The category does not exist!', //TODO + 'over_max' => 'You have reached your limit of categories (%d)', //TODO + 'updated' => 'Category has been updated.', //TODO ), 'feed' => array( - 'actualized' => '%s has been updated', - 'actualizeds' => 'RSS feeds have been updated', - 'added' => 'RSS feed %s has been added', - 'already_subscribed' => 'You have already subscribed to %s', - 'deleted' => 'Feed has been deleted', - 'error' => 'Feed cannot be updated', - 'internal_problem' => 'The RSS feed could not be added. Check FressRSS logs for details.', - 'invalid_url' => 'URL %s is invalid', - 'marked_read' => 'Feeds have been marked as read', - 'n_actualized' => '%d feeds have been updated', - 'n_entries_deleted' => '%d articles have been deleted', - 'no_refresh' => 'There is no feed to refresh…', - 'not_added' => '%s could not be added', - 'over_max' => 'You have reached your limit of feeds (%d)', - 'updated' => 'Feed has been updated', + 'actualized' => '%s has been updated', //TODO + 'actualizeds' => 'RSS feeds have been updated', //TODO + 'added' => 'RSS feed %s has been added', //TODO + 'already_subscribed' => 'You have already subscribed to %s', //TODO + 'deleted' => 'Feed has been deleted', //TODO + 'error' => 'Feed cannot be updated', //TODO + 'internal_problem' => 'The RSS feed could not be added. Check FressRSS logs for details.', //TODO + 'invalid_url' => 'URL %s is invalid', //TODO + 'marked_read' => 'Feeds have been marked as read', //TODO + 'n_actualized' => '%d feeds have been updated', //TODO + 'n_entries_deleted' => '%d articles have been deleted', //TODO + 'no_refresh' => 'There is no feed to refresh…', //TODO + 'not_added' => '%s could not be added', //TODO + 'over_max' => 'You have reached your limit of feeds (%d)', //TODO + 'updated' => 'Feed has been updated', //TODO ), - 'purge_completed' => 'Purge completed (%d articles deleted)', + 'purge_completed' => 'Purge completed (%d articles deleted)', //TODO ), 'update' => array( - 'can_apply' => 'FreshRSS will now be updated to the version %s.', - 'error' => 'The update process has encountered an error: %s', - 'file_is_nok' => 'Check permissions on %s directory. HTTP server must have rights to write into', - 'finished' => 'Update completed!', - 'none' => 'No update to apply', - 'server_not_found' => 'Update server cannot be found. [%s]', + 'can_apply' => 'FreshRSS will now be updated to the version %s.', //TODO + 'error' => 'The update process has encountered an error: %s', //TODO + 'file_is_nok' => 'New version %s available, but check permissions on %s directory. HTTP server must have rights to write into', //TODO + 'finished' => 'Update completed!', //TODO + 'none' => 'No update to apply', //TODO + 'server_not_found' => 'Update server cannot be found. [%s]', //TODO ), 'user' => array( 'created' => array( - '_' => 'User %s has been created', - 'error' => 'User %s cannot be created', + '_' => 'User %s has been created', //TODO + 'error' => 'User %s cannot be created', //TODO ), 'deleted' => array( - '_' => 'User %s has been deleted', - 'error' => 'User %s cannot be deleted', + '_' => 'User %s has been deleted', //TODO + 'error' => 'User %s cannot be deleted', //TODO ), ), 'profile' => array( - 'error' => 'Your profile cannot be modified', - 'updated' => 'Your profile has been modified', + 'error' => 'Your profile cannot be modified', //TODO + 'updated' => 'Your profile has been modified', //TODO ), ); diff --git a/app/i18n/tr/feedback.php b/app/i18n/tr/feedback.php index 87361ff51..be79630be 100644 --- a/app/i18n/tr/feedback.php +++ b/app/i18n/tr/feedback.php @@ -87,7 +87,7 @@ return array( 'update' => array( 'can_apply' => 'FreshRSS %s versiyonuna güncellenecek.', 'error' => 'Güncelleme işlemi sırasında hata: %s', - 'file_is_nok' => '%s klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı', + 'file_is_nok' => '%s versiyonuna. %s klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı', 'finished' => 'Güncelleme tamamlandı!', 'none' => 'Güncelleme yok', 'server_not_found' => 'Güncelleme sunucusu bulunamadı. [%s]', diff --git a/cli/README.md b/cli/README.md index fff16f53d..c37c84dc0 100644 --- a/cli/README.md +++ b/cli/README.md @@ -109,7 +109,7 @@ sudo git checkout -b dev origin/dev # Check out a specific version of FreshRSS # See release names on https://github.com/FreshRSS/FreshRSS/releases # You will then need to manually change version -# or checkout master or dev to get new versions +# or checkout master or dev branch to get new versions cd /usr/share/FreshRSS sudo git checkout 1.7.0 -- cgit v1.2.3 From 8abfe1cf28b9ca4b1b53073dbb1ec24953855777 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sat, 2 Dec 2017 13:45:26 +0100 Subject: Update panel shows latest version message as success (#1701) show latest version message as success, FIXES #1586 --- app/Controllers/updateController.php | 4 ++-- app/views/update/index.phtml | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'app/Controllers/updateController.php') diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 7a8a3d6c0..c67b358bb 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -102,7 +102,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $version = 'git'; } else { $this->view->message = array( - 'status' => 'bad', + 'status' => 'latest', 'title' => _t('gen.short.damn'), 'body' => _t('feedback.update.none') ); @@ -138,7 +138,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $status = $res_array[0]; if (strpos($status, 'UPDATE') !== 0) { $this->view->message = array( - 'status' => 'bad', + 'status' => 'latest', 'title' => _t('gen.short.damn'), 'body' => _t('feedback.update.none') ); diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml index da1bc7ef5..0599d5b0d 100644 --- a/app/views/update/index.phtml +++ b/app/views/update/index.phtml @@ -14,7 +14,21 @@

    message)) { ?> -

    + message['status']) { + case 'bad': + $class = 'alert-error'; + break; + case 'latest': + $class = 'alert-success'; + break; + default: + $class = 'alert-warn'; + break; + } + ?> +

    message['title']; ?> message['body']; ?>

    -- cgit v1.2.3