summaryrefslogtreecommitdiff
path: root/app/Controllers/subscriptionController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/subscriptionController.php')
-rw-r--r--app/Controllers/subscriptionController.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 37efd3b57..701a588e0 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -15,7 +15,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
}
$catDAO = new FreshRSS_CategoryDAO();
- $feedDAO = new FreshRSS_FeedDAO();
+ $feedDAO = FreshRSS_Factory::createFeedDao();
$catDAO->checkDefault();
$feedDAO->updateTTL();
@@ -74,9 +74,10 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
return;
}
- $this->view->feed = $this->view->feeds[$id];
+ $feed = $this->view->feeds[$id];
+ $this->view->feed = $feed;
- Minz_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $this->view->feed->name() . ' · ');
+ Minz_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $feed->name() . ' · ');
if (Minz_Request::isPost()) {
$user = trim(Minz_Request::param('http_user_feed' . $id, ''));
@@ -95,6 +96,18 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
$ttl = FreshRSS_Context::$user_conf->ttl_default;
}
+ $feed->_attributes('mark_updated_article_unread', Minz_Request::paramTernary('mark_updated_article_unread'));
+ $feed->_attributes('read_upon_reception', Minz_Request::paramTernary('read_upon_reception'));
+
+ if (FreshRSS_Auth::hasAccess('admin')) {
+ $feed->_attributes('ssl_verify', Minz_Request::paramTernary('ssl_verify'));
+ $timeout = intval(Minz_Request::param('timeout', 0));
+ $feed->_attributes('timeout', $timeout > 0 ? $timeout : null);
+ } else {
+ $feed->_attributes('ssl_verify', null);
+ $feed->_attributes('timeout', null);
+ }
+
$values = array(
'name' => Minz_Request::param('name', ''),
'description' => sanitizeHTML(Minz_Request::param('description', '', true)),
@@ -106,14 +119,15 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
'httpAuth' => $httpAuth,
'keep_history' => intval(Minz_Request::param('keep_history', FreshRSS_Feed::KEEP_HISTORY_DEFAULT)),
'ttl' => $ttl * ($mute ? -1 : 1),
+ 'attributes' => $feed->attributes()
);
invalidateHttpCache();
$url_redirect = array('c' => 'subscription', 'params' => array('id' => $id));
if ($feedDAO->updateFeed($id, $values) !== false) {
- $this->view->feed->_category($cat);
- $this->view->feed->faviconPrepare();
+ $feed->_category($cat);
+ $feed->faviconPrepare();
Minz_Request::good(_t('feedback.sub.feed.updated'), $url_redirect);
} else {