diff options
| author | 2015-01-15 11:20:16 +0100 | |
|---|---|---|
| committer | 2015-01-15 11:20:16 +0100 | |
| commit | 556f4ad4bfa722e3350f20ab91a08f0af1d11f9e (patch) | |
| tree | 96183f5387e2130b139115d91d7937c13aeca800 | |
| parent | 81dac9975d0c662467cc2625154da2568457e3dd (diff) | |
Remove restriction of 1h for update checking
| -rw-r--r-- | app/Controllers/updateController.php | 8 | ||||
| -rw-r--r-- | 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 @@ <span class="alert-head"><?php echo $this->message['title']; ?></span> <?php echo $this->message['body']; ?> </p> - <?php } elseif ($this->check_last_hour) { ?> - <p class="alert alert-warn"> - <span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> - <?php echo _t('admin.update.none'); ?> - </p> <?php } ?> <?php - if (!$this->check_last_hour && - (empty($this->message) || $this->message['status'] !== 'good')) { + if (empty($this->message) || $this->message['status'] !== 'good') { ?> <p> <a href="<?php echo _url('update', 'check'); ?>" class="btn"><?php echo _t('admin.update.check'); ?></a> |
