|
|
@@ -44,32 +44,32 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
*/
|
|
|
public function displayAction(): void {
|
|
|
if (Minz_Request::isPost()) {
|
|
|
- FreshRSS_Context::$user_conf->language = Minz_Request::paramString('language') ?: 'en';
|
|
|
- FreshRSS_Context::$user_conf->timezone = Minz_Request::paramString('timezone');
|
|
|
- FreshRSS_Context::$user_conf->theme = Minz_Request::paramString('theme') ?: FreshRSS_Themes::$defaultTheme;
|
|
|
- FreshRSS_Context::$user_conf->darkMode = Minz_Request::paramString('darkMode') ?: 'no';
|
|
|
- FreshRSS_Context::$user_conf->content_width = Minz_Request::paramString('content_width') ?: 'thin';
|
|
|
- FreshRSS_Context::$user_conf->topline_read = Minz_Request::paramBoolean('topline_read');
|
|
|
- FreshRSS_Context::$user_conf->topline_favorite = Minz_Request::paramBoolean('topline_favorite');
|
|
|
- FreshRSS_Context::$user_conf->topline_date = Minz_Request::paramBoolean('topline_date');
|
|
|
- FreshRSS_Context::$user_conf->topline_link = Minz_Request::paramBoolean('topline_link');
|
|
|
- FreshRSS_Context::$user_conf->topline_website = Minz_Request::paramString('topline_website');
|
|
|
- FreshRSS_Context::$user_conf->topline_thumbnail = Minz_Request::paramString('topline_thumbnail');
|
|
|
- FreshRSS_Context::$user_conf->topline_summary = Minz_Request::paramBoolean('topline_summary');
|
|
|
- FreshRSS_Context::$user_conf->topline_display_authors = Minz_Request::paramBoolean('topline_display_authors');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_read = Minz_Request::paramBoolean('bottomline_read');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_favorite = Minz_Request::paramBoolean('bottomline_favorite');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_sharing = Minz_Request::paramBoolean('bottomline_sharing');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_tags = Minz_Request::paramBoolean('bottomline_tags');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_myLabels = Minz_Request::paramBoolean('bottomline_myLabels');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_date = Minz_Request::paramBoolean('bottomline_date');
|
|
|
- FreshRSS_Context::$user_conf->bottomline_link = Minz_Request::paramBoolean('bottomline_link');
|
|
|
- FreshRSS_Context::$user_conf->show_nav_buttons = Minz_Request::paramBoolean('show_nav_buttons');
|
|
|
- FreshRSS_Context::$user_conf->html5_notif_timeout = Minz_Request::paramInt('html5_notif_timeout');
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
-
|
|
|
- Minz_Session::_param('language', FreshRSS_Context::$user_conf->language);
|
|
|
- Minz_Translate::reset(FreshRSS_Context::$user_conf->language);
|
|
|
+ FreshRSS_Context::userConf()->language = Minz_Request::paramString('language') ?: 'en';
|
|
|
+ FreshRSS_Context::userConf()->timezone = Minz_Request::paramString('timezone');
|
|
|
+ FreshRSS_Context::userConf()->theme = Minz_Request::paramString('theme') ?: FreshRSS_Themes::$defaultTheme;
|
|
|
+ FreshRSS_Context::userConf()->darkMode = Minz_Request::paramString('darkMode') ?: 'no';
|
|
|
+ FreshRSS_Context::userConf()->content_width = Minz_Request::paramString('content_width') ?: 'thin';
|
|
|
+ FreshRSS_Context::userConf()->topline_read = Minz_Request::paramBoolean('topline_read');
|
|
|
+ FreshRSS_Context::userConf()->topline_favorite = Minz_Request::paramBoolean('topline_favorite');
|
|
|
+ FreshRSS_Context::userConf()->topline_date = Minz_Request::paramBoolean('topline_date');
|
|
|
+ FreshRSS_Context::userConf()->topline_link = Minz_Request::paramBoolean('topline_link');
|
|
|
+ FreshRSS_Context::userConf()->topline_website = Minz_Request::paramString('topline_website');
|
|
|
+ FreshRSS_Context::userConf()->topline_thumbnail = Minz_Request::paramString('topline_thumbnail');
|
|
|
+ FreshRSS_Context::userConf()->topline_summary = Minz_Request::paramBoolean('topline_summary');
|
|
|
+ FreshRSS_Context::userConf()->topline_display_authors = Minz_Request::paramBoolean('topline_display_authors');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_read = Minz_Request::paramBoolean('bottomline_read');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_favorite = Minz_Request::paramBoolean('bottomline_favorite');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_sharing = Minz_Request::paramBoolean('bottomline_sharing');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_tags = Minz_Request::paramBoolean('bottomline_tags');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_myLabels = Minz_Request::paramBoolean('bottomline_myLabels');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_date = Minz_Request::paramBoolean('bottomline_date');
|
|
|
+ FreshRSS_Context::userConf()->bottomline_link = Minz_Request::paramBoolean('bottomline_link');
|
|
|
+ FreshRSS_Context::userConf()->show_nav_buttons = Minz_Request::paramBoolean('show_nav_buttons');
|
|
|
+ FreshRSS_Context::userConf()->html5_notif_timeout = Minz_Request::paramInt('html5_notif_timeout');
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
+
|
|
|
+ Minz_Session::_param('language', FreshRSS_Context::userConf()->language);
|
|
|
+ Minz_Translate::reset(FreshRSS_Context::userConf()->language);
|
|
|
invalidateHttpCache();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'display' ]);
|
|
|
@@ -111,27 +111,31 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
*/
|
|
|
public function readingAction(): void {
|
|
|
if (Minz_Request::isPost()) {
|
|
|
- FreshRSS_Context::$user_conf->posts_per_page = Minz_Request::paramInt('posts_per_page') ?: 10;
|
|
|
- FreshRSS_Context::$user_conf->view_mode = Minz_Request::paramString('view_mode', true) ?: 'normal';
|
|
|
- FreshRSS_Context::$user_conf->default_view = Minz_Request::paramString('default_view') ?: 'adaptive';
|
|
|
- FreshRSS_Context::$user_conf->show_fav_unread = Minz_Request::paramBoolean('show_fav_unread');
|
|
|
- FreshRSS_Context::$user_conf->auto_load_more = Minz_Request::paramBoolean('auto_load_more');
|
|
|
- FreshRSS_Context::$user_conf->display_posts = Minz_Request::paramBoolean('display_posts');
|
|
|
- FreshRSS_Context::$user_conf->display_categories = Minz_Request::paramString('display_categories') ?: 'active';
|
|
|
- FreshRSS_Context::$user_conf->show_tags = Minz_Request::paramString('show_tags') ?: '0';
|
|
|
- FreshRSS_Context::$user_conf->show_tags_max = Minz_Request::paramInt('show_tags_max');
|
|
|
- FreshRSS_Context::$user_conf->show_author_date = Minz_Request::paramString('show_author_date') ?: '0';
|
|
|
- FreshRSS_Context::$user_conf->show_feed_name = Minz_Request::paramString('show_feed_name') ?: 't';
|
|
|
- FreshRSS_Context::$user_conf->hide_read_feeds = Minz_Request::paramBoolean('hide_read_feeds');
|
|
|
- FreshRSS_Context::$user_conf->onread_jump_next = Minz_Request::paramBoolean('onread_jump_next');
|
|
|
- FreshRSS_Context::$user_conf->lazyload = Minz_Request::paramBoolean('lazyload');
|
|
|
- FreshRSS_Context::$user_conf->sides_close_article = Minz_Request::paramBoolean('sides_close_article');
|
|
|
- FreshRSS_Context::$user_conf->sticky_post = Minz_Request::paramBoolean('sticky_post');
|
|
|
- FreshRSS_Context::$user_conf->reading_confirm = Minz_Request::paramBoolean('reading_confirm');
|
|
|
- FreshRSS_Context::$user_conf->auto_remove_article = Minz_Request::paramBoolean('auto_remove_article');
|
|
|
- FreshRSS_Context::$user_conf->mark_updated_article_unread = Minz_Request::paramBoolean('mark_updated_article_unread');
|
|
|
- FreshRSS_Context::$user_conf->sort_order = Minz_Request::paramString('sort_order') ?: 'DESC';
|
|
|
- FreshRSS_Context::$user_conf->mark_when = [
|
|
|
+ FreshRSS_Context::userConf()->posts_per_page = Minz_Request::paramInt('posts_per_page') ?: 10;
|
|
|
+ FreshRSS_Context::userConf()->view_mode = Minz_Request::paramString('view_mode', true) ?: 'normal';
|
|
|
+ FreshRSS_Context::userConf()->default_view = Minz_Request::paramString('default_view') ?: 'adaptive';
|
|
|
+ FreshRSS_Context::userConf()->show_fav_unread = Minz_Request::paramBoolean('show_fav_unread');
|
|
|
+ FreshRSS_Context::userConf()->auto_load_more = Minz_Request::paramBoolean('auto_load_more');
|
|
|
+ FreshRSS_Context::userConf()->display_posts = Minz_Request::paramBoolean('display_posts');
|
|
|
+ FreshRSS_Context::userConf()->display_categories = Minz_Request::paramString('display_categories') ?: 'active';
|
|
|
+ FreshRSS_Context::userConf()->show_tags = Minz_Request::paramString('show_tags') ?: '0';
|
|
|
+ FreshRSS_Context::userConf()->show_tags_max = Minz_Request::paramInt('show_tags_max');
|
|
|
+ FreshRSS_Context::userConf()->show_author_date = Minz_Request::paramString('show_author_date') ?: '0';
|
|
|
+ FreshRSS_Context::userConf()->show_feed_name = Minz_Request::paramString('show_feed_name') ?: 't';
|
|
|
+ FreshRSS_Context::userConf()->hide_read_feeds = Minz_Request::paramBoolean('hide_read_feeds');
|
|
|
+ FreshRSS_Context::userConf()->onread_jump_next = Minz_Request::paramBoolean('onread_jump_next');
|
|
|
+ FreshRSS_Context::userConf()->lazyload = Minz_Request::paramBoolean('lazyload');
|
|
|
+ FreshRSS_Context::userConf()->sides_close_article = Minz_Request::paramBoolean('sides_close_article');
|
|
|
+ FreshRSS_Context::userConf()->sticky_post = Minz_Request::paramBoolean('sticky_post');
|
|
|
+ FreshRSS_Context::userConf()->reading_confirm = Minz_Request::paramBoolean('reading_confirm');
|
|
|
+ FreshRSS_Context::userConf()->auto_remove_article = Minz_Request::paramBoolean('auto_remove_article');
|
|
|
+ FreshRSS_Context::userConf()->mark_updated_article_unread = Minz_Request::paramBoolean('mark_updated_article_unread');
|
|
|
+ if (in_array(Minz_Request::paramString('sort_order'), ['ASC', 'DESC'], true)) {
|
|
|
+ FreshRSS_Context::userConf()->sort_order = Minz_Request::paramString('sort_order');
|
|
|
+ } else {
|
|
|
+ FreshRSS_Context::userConf()->sort_order = 'DESC';
|
|
|
+ }
|
|
|
+ FreshRSS_Context::userConf()->mark_when = [
|
|
|
'article' => Minz_Request::paramBoolean('mark_open_article'),
|
|
|
'gone' => Minz_Request::paramBoolean('read_upon_gone'),
|
|
|
'max_n_unread' => Minz_Request::paramBoolean('enable_keep_max_n_unread') ? Minz_Request::paramInt('keep_max_n_unread') : false,
|
|
|
@@ -142,8 +146,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
'site' => Minz_Request::paramBoolean('mark_open_site'),
|
|
|
'focus' => Minz_Request::paramBoolean('mark_focus'),
|
|
|
];
|
|
|
- FreshRSS_Context::$user_conf->_filtersAction('read', Minz_Request::paramTextToArray('filteractions_read'));
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->_filtersAction('read', Minz_Request::paramTextToArray('filteractions_read'));
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
invalidateHttpCache();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'reading' ]);
|
|
|
@@ -168,8 +172,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
|
|
|
if (Minz_Request::isPost()) {
|
|
|
$params = $_POST;
|
|
|
- FreshRSS_Context::$user_conf->sharing = $params['share'];
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->sharing = $params['share'];
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
invalidateHttpCache();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'integration' ]);
|
|
|
@@ -199,8 +203,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$default = Minz_Configuration::load(FRESHRSS_PATH . '/config-user.default.php');
|
|
|
$shortcuts = $default['shortcuts'];
|
|
|
}
|
|
|
- FreshRSS_Context::$user_conf->shortcuts = array_map('trim', $shortcuts);
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->shortcuts = array_map('trim', $shortcuts);
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
invalidateHttpCache();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.shortcuts_updated'), ['c' => 'configure', 'a' => 'shortcut']);
|
|
|
@@ -237,8 +241,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$keepPeriod = false;
|
|
|
}
|
|
|
|
|
|
- FreshRSS_Context::$user_conf->ttl_default = Minz_Request::paramInt('ttl_default') ?: FreshRSS_Feed::TTL_DEFAULT;
|
|
|
- FreshRSS_Context::$user_conf->archiving = [
|
|
|
+ FreshRSS_Context::userConf()->ttl_default = Minz_Request::paramInt('ttl_default') ?: FreshRSS_Feed::TTL_DEFAULT;
|
|
|
+ FreshRSS_Context::userConf()->archiving = [
|
|
|
'keep_period' => $keepPeriod,
|
|
|
'keep_max' => $keepMax,
|
|
|
'keep_min' => Minz_Request::paramInt('keep_min_default'),
|
|
|
@@ -246,9 +250,9 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
'keep_labels' => Minz_Request::paramBoolean('keep_labels'),
|
|
|
'keep_unreads' => Minz_Request::paramBoolean('keep_unreads'),
|
|
|
];
|
|
|
- FreshRSS_Context::$user_conf->keep_history_default = null; //Legacy < FreshRSS 1.15
|
|
|
- FreshRSS_Context::$user_conf->old_entries = null; //Legacy < FreshRSS 1.15
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->keep_history_default = null; //Legacy < FreshRSS 1.15
|
|
|
+ FreshRSS_Context::userConf()->old_entries = null; //Legacy < FreshRSS 1.15
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
invalidateHttpCache();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'archiving' ]);
|
|
|
@@ -259,8 +263,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
'keep_period_count' => '3',
|
|
|
'keep_period_unit' => 'P1M',
|
|
|
];
|
|
|
- if (!empty(FreshRSS_Context::$user_conf->archiving['keep_period'])) {
|
|
|
- $keepPeriod = FreshRSS_Context::$user_conf->archiving['keep_period'];
|
|
|
+ if (!empty(FreshRSS_Context::userConf()->archiving['keep_period'])) {
|
|
|
+ $keepPeriod = FreshRSS_Context::userConf()->archiving['keep_period'];
|
|
|
if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $keepPeriod, $matches)) {
|
|
|
$volatile = [
|
|
|
'enable_keep_period' => true,
|
|
|
@@ -269,7 +273,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
- FreshRSS_Context::$user_conf->volatile = $volatile;
|
|
|
+ FreshRSS_Context::userConf()->volatile = $volatile;
|
|
|
|
|
|
$entryDAO = FreshRSS_Factory::createEntryDao();
|
|
|
$this->view->nb_total = $entryDAO->count();
|
|
|
@@ -316,13 +320,13 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
}
|
|
|
$queries[$key] = (new FreshRSS_UserQuery($query, $feed_dao, $category_dao, $tag_dao))->toArray();
|
|
|
}
|
|
|
- FreshRSS_Context::$user_conf->queries = $queries;
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->queries = $queries;
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries' ]);
|
|
|
} else {
|
|
|
$this->view->queries = [];
|
|
|
- foreach (FreshRSS_Context::$user_conf->queries as $key => $query) {
|
|
|
+ foreach (FreshRSS_Context::userConf()->queries as $key => $query) {
|
|
|
$this->view->queries[intval($key)] = new FreshRSS_UserQuery($query, $feed_dao, $category_dao, $tag_dao);
|
|
|
}
|
|
|
}
|
|
|
@@ -354,7 +358,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
}
|
|
|
|
|
|
$id = Minz_Request::paramInt('id');
|
|
|
- if (Minz_Request::paramTernary('id') === null || empty(FreshRSS_Context::$user_conf->queries[$id])) {
|
|
|
+ if (Minz_Request::paramTernary('id') === null || empty(FreshRSS_Context::userConf()->queries[$id])) {
|
|
|
Minz_Error::error(404);
|
|
|
return;
|
|
|
}
|
|
|
@@ -363,7 +367,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$feed_dao = FreshRSS_Factory::createFeedDao();
|
|
|
$tag_dao = FreshRSS_Factory::createTagDao();
|
|
|
|
|
|
- $query = new FreshRSS_UserQuery(FreshRSS_Context::$user_conf->queries[$id], $feed_dao, $category_dao, $tag_dao);
|
|
|
+ $query = new FreshRSS_UserQuery(FreshRSS_Context::userConf()->queries[$id], $feed_dao, $category_dao, $tag_dao);
|
|
|
$this->view->query = $query;
|
|
|
$this->view->queryId = $id;
|
|
|
$this->view->categories = $category_dao->listCategories(false) ?: [];
|
|
|
@@ -371,7 +375,6 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$this->view->tags = $tag_dao->listTags() ?: [];
|
|
|
|
|
|
if (Minz_Request::isPost()) {
|
|
|
- /** @var array<string,string|array<string,string>> $params */
|
|
|
$params = array_filter(Minz_Request::paramArray('query'));
|
|
|
$queryParams = [];
|
|
|
if (!empty($params['get']) && is_string($params['get'])) {
|
|
|
@@ -393,10 +396,10 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$queryParams['name'] = $name;
|
|
|
$queryParams['url'] = Minz_Url::display(['params' => $queryParams]);
|
|
|
|
|
|
- $queries = FreshRSS_Context::$user_conf->queries;
|
|
|
+ $queries = FreshRSS_Context::userConf()->queries;
|
|
|
$queries[$id] = (new FreshRSS_UserQuery($queryParams, $feed_dao, $category_dao, $tag_dao))->toArray();
|
|
|
- FreshRSS_Context::$user_conf->queries = $queries;
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->queries = $queries;
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries', 'params' => ['id' => (string)$id] ]);
|
|
|
}
|
|
|
@@ -409,15 +412,15 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
*/
|
|
|
public function deleteQueryAction(): void {
|
|
|
$id = Minz_Request::paramInt('id');
|
|
|
- if (Minz_Request::paramTernary('id') === null || empty(FreshRSS_Context::$user_conf->queries[$id])) {
|
|
|
+ if (Minz_Request::paramTernary('id') === null || empty(FreshRSS_Context::userConf()->queries[$id])) {
|
|
|
Minz_Error::error(404);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $queries = FreshRSS_Context::$user_conf->queries;
|
|
|
+ $queries = FreshRSS_Context::userConf()->queries;
|
|
|
unset($queries[$id]);
|
|
|
- FreshRSS_Context::$user_conf->queries = $queries;
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->queries = $queries;
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries' ]);
|
|
|
}
|
|
|
@@ -434,7 +437,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$feed_dao = FreshRSS_Factory::createFeedDao();
|
|
|
$tag_dao = FreshRSS_Factory::createTagDao();
|
|
|
$queries = [];
|
|
|
- foreach (FreshRSS_Context::$user_conf->queries as $key => $query) {
|
|
|
+ foreach (FreshRSS_Context::userConf()->queries as $key => $query) {
|
|
|
$queries[$key] = (new FreshRSS_UserQuery($query, $feed_dao, $category_dao, $tag_dao))->toArray();
|
|
|
}
|
|
|
$params = $_GET;
|
|
|
@@ -443,8 +446,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
$params['name'] = _t('conf.query.number', count($queries) + 1);
|
|
|
$queries[] = (new FreshRSS_UserQuery($params, $feed_dao, $category_dao, $tag_dao))->toArray();
|
|
|
|
|
|
- FreshRSS_Context::$user_conf->queries = $queries;
|
|
|
- FreshRSS_Context::$user_conf->save();
|
|
|
+ FreshRSS_Context::userConf()->queries = $queries;
|
|
|
+ FreshRSS_Context::userConf()->save();
|
|
|
|
|
|
Minz_Request::good(_t('feedback.conf.query_created', $params['name']), [ 'c' => 'configure', 'a' => 'queries' ]);
|
|
|
}
|
|
|
@@ -473,17 +476,17 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
|
|
|
}
|
|
|
|
|
|
if (Minz_Request::isPost()) {
|
|
|
- $limits = FreshRSS_Context::$system_conf->limits;
|
|
|
+ $limits = FreshRSS_Context::systemConf()->limits;
|
|
|
$limits['max_registrations'] = Minz_Request::paramInt('max-registrations') ?: 1;
|
|
|
$limits['max_feeds'] = Minz_Request::paramInt('max-feeds') ?: 16384;
|
|
|
$limits['max_categories'] = Minz_Request::paramInt('max-categories') ?: 16384;
|
|
|
$limits['cookie_duration'] = Minz_Request::paramInt('cookie-duration') ?: FreshRSS_Auth::DEFAULT_COOKIE_DURATION;
|
|
|
- FreshRSS_Context::$system_conf->limits = $limits;
|
|
|
- FreshRSS_Context::$system_conf->title = Minz_Request::paramString('instance-name') ?: 'FreshRSS';
|
|
|
- FreshRSS_Context::$system_conf->auto_update_url = Minz_Request::paramString('auto-update-url');
|
|
|
- FreshRSS_Context::$system_conf->force_email_validation = Minz_Request::paramBoolean('force-email-validation');
|
|
|
- FreshRSS_Context::$system_conf->base_url = Minz_Request::paramString('base-url');
|
|
|
- FreshRSS_Context::$system_conf->save();
|
|
|
+ FreshRSS_Context::systemConf()->limits = $limits;
|
|
|
+ FreshRSS_Context::systemConf()->title = Minz_Request::paramString('instance-name') ?: 'FreshRSS';
|
|
|
+ FreshRSS_Context::systemConf()->auto_update_url = Minz_Request::paramString('auto-update-url');
|
|
|
+ FreshRSS_Context::systemConf()->force_email_validation = Minz_Request::paramBoolean('force-email-validation');
|
|
|
+ FreshRSS_Context::systemConf()->base_url = Minz_Request::paramString('base-url');
|
|
|
+ FreshRSS_Context::systemConf()->save();
|
|
|
|
|
|
invalidateHttpCache();
|
|
|
|