summaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-15 11:20:16 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-15 11:20:16 +0100
commit556f4ad4bfa722e3350f20ab91a08f0af1d11f9e (patch)
tree96183f5387e2130b139115d91d7937c13aeca800 /app/Controllers/updateController.php
parent81dac9975d0c662467cc2625154da2568457e3dd (diff)
Remove restriction of 1h for update checking
Diffstat (limited to 'app/Controllers/updateController.php')
-rw-r--r--app/Controllers/updateController.php8
1 files changed, 3 insertions, 5 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',