diff options
| author | 2014-08-10 11:52:18 +0200 | |
|---|---|---|
| committer | 2014-08-10 11:52:18 +0200 | |
| commit | 3ca8c7ec4c55b4fa751fbcdc8e28f28351c4a967 (patch) | |
| tree | 47f0145e558604dbf11d9b6166a281970791b04b /app | |
| parent | 9a5d6245fbeb413766362fd6b2c4f5f5b6a22a22 (diff) | |
Litlle improvements (update system)
- Check UPDATE_FILENAME exists before applying update
- Add empty line at the end of files
Diffstat (limited to 'app')
| -rw-r--r-- | app/Controllers/updateController.php | 7 | ||||
| -rw-r--r-- | app/views/update/apply.phtml | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 1095f9da7..fa62f4a70 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -79,10 +79,15 @@ class FreshRSS_update_Controller extends Minz_ActionController { 'body' => _t('update_server_not_found', FRESHRSS_UPDATE_WEBSITE) ); } + curl_close($c); } public function applyAction() { + if (!file_exists(UPDATE_FILENAME)) { + Minz_Request::forward(array('c' => 'update'), true); + } + require(UPDATE_FILENAME); if (Minz_Request::isPost()) { @@ -113,4 +118,4 @@ class FreshRSS_update_Controller extends Minz_ActionController { } } } -}
\ No newline at end of file +} diff --git a/app/views/update/apply.phtml b/app/views/update/apply.phtml index d7ea466c5..30566c7ab 100644 --- a/app/views/update/apply.phtml +++ b/app/views/update/apply.phtml @@ -6,4 +6,4 @@ <h1><?php echo _t('update_system'); ?></h1> <?php ask_info_update(); ?> -</div>
\ No newline at end of file +</div> |
