diff options
| author | 2017-05-26 12:19:41 +0200 | |
|---|---|---|
| committer | 2017-05-26 12:19:41 +0200 | |
| commit | e12f9d4a98f3e95cea6e9506c2517984e6100b1f (patch) | |
| tree | 52f36d728f922f54bb99addde2c2acd3a077e87d /app/Controllers | |
| parent | d4d2c62b529b774aa3dcfc98bb9ff135e5f185c3 (diff) | |
| parent | b848511574d52ca34c91dfacc7ff0e0059b083a6 (diff) | |
Merge remote-tracking branch 'FreshRSS/dev' into dev
Diffstat (limited to 'app/Controllers')
| -rwxr-xr-x | app/Controllers/feedController.php | 1 | ||||
| -rw-r--r-- | app/Controllers/updateController.php | 30 |
2 files changed, 17 insertions, 14 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 8e0e5dd6d..c9b6deaa7 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -348,6 +348,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } else { if ($isNewFeed) { $id = min(time(), $entry_date) . uSecString(); + $entry->_isRead($is_read); } elseif ($entry_date < $date_min) { $id = min(time(), $entry_date) . uSecString(); $entry->_isRead(true); //Old article that was not in database. Probably an error, so mark as read diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 35c7d1124..7a8a3d6c0 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -59,24 +59,26 @@ class FreshRSS_update_Controller extends Minz_ActionController { public function indexAction() { Minz_View::prependTitle(_t('admin.update.title') . ' ยท '); - if (!is_writable(FRESHRSS_PATH)) { - $this->view->message = array( - 'status' => 'bad', - 'title' => _t('gen.short.damn'), - 'body' => _t('feedback.update.file_is_nok', FRESHRSS_PATH) - ); - } elseif (file_exists(UPDATE_FILENAME)) { + if (file_exists(UPDATE_FILENAME)) { // There is an update file to apply! $version = @file_get_contents(join_path(DATA_PATH, 'last_update.txt')); - if (empty($version)) { + if ($version == '') { $version = 'unknown'; } - $this->view->update_to_apply = true; - $this->view->message = array( - 'status' => 'good', - 'title' => _t('gen.short.ok'), - 'body' => _t('feedback.update.can_apply', $version) - ); + if (is_writable(FRESHRSS_PATH)) { + $this->view->update_to_apply = true; + $this->view->message = array( + 'status' => 'good', + 'title' => _t('gen.short.ok'), + 'body' => _t('feedback.update.can_apply', $version), + ); + } else { + $this->view->message = array( + 'status' => 'bad', + 'title' => _t('gen.short.damn'), + 'body' => _t('feedback.update.file_is_nok', $version, FRESHRSS_PATH), + ); + } } } |
