A free, self-hostable news aggregator…
Update panel shows latest version message as success (#1701)
Kevin Papst8abfe1cf28b9
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.phpindex 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.phtmlindex da1bc7ef5..0599d5b0d 100644--- a/app/views/update/index.phtml+++ b/app/views/update/index.phtml@@ -14,7 +14,21 @@</p><?php if (!empty($this->message)) { ?>- <p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>">+ <?php+ $class = 'alert-warn';+ switch ($this->message['status']) {+ case 'bad':+ $class = 'alert-error';+ break;+ case 'latest':+ $class = 'alert-success';+ break;+ default:+ $class = 'alert-warn';+ break;+ }+ ?>+ <p class="alert <?php echo $class; ?>"><span class="alert-head"><?php echo $this->message['title']; ?></span><?php echo $this->message['body']; ?></p>