From 556f4ad4bfa722e3350f20ab91a08f0af1d11f9e Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 15 Jan 2015 11:20:16 +0100 Subject: Remove restriction of 1h for update checking --- app/Controllers/updateController.php | 8 +++----- app/views/update/index.phtml | 8 +------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 4bdd96f6d..1ea5816da 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -11,11 +11,9 @@ class FreshRSS_update_Controller extends Minz_ActionController { $this->view->update_to_apply = false; $this->view->last_update_time = 'unknown'; - $this->view->check_last_hour = false; $timestamp = @filemtime(join_path(DATA_PATH, 'last_update.txt')); if ($timestamp !== false) { $this->view->last_update_time = timestamptodate($timestamp); - $this->view->check_last_hour = (time() - 3600) <= $timestamp; } } @@ -43,11 +41,11 @@ class FreshRSS_update_Controller extends Minz_ActionController { public function checkAction() { $this->view->change_view('update', 'index'); - if (file_exists(UPDATE_FILENAME) || $this->view->check_last_hour) { + if (file_exists(UPDATE_FILENAME)) { // There is already an update file to apply: we don't need to check // the webserver! // Or if already check during the last hour, do nothing. - Minz_Request::forward(array('c' => 'update')); + Minz_Request::forward(array('c' => 'update'), true); return; } @@ -94,7 +92,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { $version = $version[1]; @file_put_contents(join_path(DATA_PATH, 'last_update.txt'), $version); - Minz_Request::forward(array('c' => 'update')); + Minz_Request::forward(array('c' => 'update'), true); } else { $this->view->message = array( 'status' => 'bad', diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml index 4c88a0d18..da1bc7ef5 100644 --- a/app/views/update/index.phtml +++ b/app/views/update/index.phtml @@ -18,16 +18,10 @@ message['title']; ?> message['body']; ?>

- check_last_hour) { ?> -

- - -

check_last_hour && - (empty($this->message) || $this->message['status'] !== 'good')) { + if (empty($this->message) || $this->message['status'] !== 'good') { ?>

-- cgit v1.2.3