4
0

subscriptionController.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * Controller to handle subscription actions.
  5. */
  6. class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
  7. /**
  8. * This action is called before every other action in that class. It is
  9. * the common boilerplate for every action. It is triggered by the
  10. * underlying framework.
  11. */
  12. #[\Override]
  13. public function firstAction(): void {
  14. if (!FreshRSS_Auth::hasAccess()) {
  15. Minz_Error::error(403);
  16. }
  17. $catDAO = FreshRSS_Factory::createCategoryDao();
  18. $catDAO->checkDefault();
  19. $this->view->categories = $catDAO->listSortedCategories(prePopulateFeeds: false, details: true);
  20. $signalError = false;
  21. foreach ($this->view->categories as $cat) {
  22. $feeds = $cat->feeds();
  23. foreach ($feeds as $feed) {
  24. if ($feed->inError()) {
  25. $signalError = true;
  26. }
  27. }
  28. if ($signalError) {
  29. break;
  30. }
  31. }
  32. $this->view->signalError = $signalError;
  33. }
  34. /**
  35. * This action handles the main subscription page
  36. *
  37. * It displays categories and associated feeds.
  38. */
  39. public function indexAction(): void {
  40. FreshRSS_View::appendScript(Minz_Url::display('/scripts/category.js?' . @filemtime(PUBLIC_PATH . '/scripts/category.js')));
  41. FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js')));
  42. FreshRSS_View::prependTitle(_t('sub.title') . ' · ');
  43. $this->_csp([
  44. 'default-src' => "'self'",
  45. 'frame-ancestors' => FreshRSS_Context::systemConf()->attributeString('csp.frame-ancestors') ?? "'none'",
  46. 'img-src' => "'self' data: blob:",
  47. ]);
  48. $this->view->onlyFeedsWithError = Minz_Request::paramBoolean('error');
  49. $id = Minz_Request::paramInt('id');
  50. $this->view->displaySlider = false;
  51. if ($id !== 0) {
  52. $type = Minz_Request::paramString('type');
  53. $this->view->displaySlider = true;
  54. switch ($type) {
  55. case 'category':
  56. $categoryDAO = FreshRSS_Factory::createCategoryDao();
  57. $this->view->category = $categoryDAO->searchById($id);
  58. break;
  59. default:
  60. $feedDAO = FreshRSS_Factory::createFeedDao();
  61. $this->view->feed = $feedDAO->searchById($id) ?? FreshRSS_Feed::default();
  62. break;
  63. }
  64. }
  65. }
  66. /**
  67. * This action handles the feed configuration page.
  68. *
  69. * It displays the feed configuration page.
  70. * If this action is reached through a POST request, it stores all new
  71. * configuration values then sends a notification to the user.
  72. *
  73. * The options available on the page are:
  74. * - name
  75. * - description
  76. * - website URL
  77. * - feed URL
  78. * - category id (default: default category id)
  79. * - CSS path to article on website
  80. * - favicon
  81. * - display in main stream (default: 0)
  82. * - HTTP authentication
  83. * - number of article to retain (default: -2)
  84. * - refresh frequency (default: 0)
  85. * Default values are empty strings unless specified.
  86. */
  87. public function feedAction(): void {
  88. if (Minz_Request::paramBoolean('ajax')) {
  89. $this->view->_layout(null);
  90. } else {
  91. FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js')));
  92. }
  93. $id = Minz_Request::paramInt('id');
  94. if ($id === 0) {
  95. Minz_Error::error(400);
  96. return;
  97. }
  98. $feedDAO = FreshRSS_Factory::createFeedDao();
  99. $feed = $feedDAO->searchById($id);
  100. if ($feed === null) {
  101. Minz_Error::error(404);
  102. return;
  103. }
  104. $this->view->feed = $feed;
  105. FreshRSS_View::prependTitle($feed->name() . ' · ' . _t('sub.title.feed_management') . ' · ');
  106. $this->_csp([
  107. 'default-src' => "'self'",
  108. 'frame-ancestors' => FreshRSS_Context::systemConf()->attributeString('csp.frame-ancestors') ?? "'none'",
  109. 'img-src' => "'self' data: blob:",
  110. ]);
  111. if (Minz_Request::isPost()) {
  112. $unicityCriteria = Minz_Request::paramString('unicityCriteria');
  113. if (in_array($unicityCriteria, ['id', '', null], strict: true)) {
  114. $unicityCriteria = null;
  115. }
  116. if ($unicityCriteria === null && $feed->attributeBoolean('hasBadGuids')) { // Legacy
  117. $unicityCriteria = 'link';
  118. }
  119. $feed->_attribute('hasBadGuids', null); // Remove legacy
  120. $feed->_attribute('unicityCriteria', $unicityCriteria);
  121. $feed->_attribute('unicityCriteriaForced', Minz_Request::paramBoolean('unicityCriteriaForced') ? true : null);
  122. $user = Minz_Request::paramString('http_user_feed' . $id);
  123. $pass = Minz_Request::paramString('http_pass_feed' . $id);
  124. $httpAuth = '';
  125. if ($user !== '' && $pass !== '') { //TODO: Sanitize
  126. $httpAuth = $user . ':' . $pass;
  127. }
  128. $feed->_ttl(Minz_Request::paramInt('ttl') ?: FreshRSS_Feed::TTL_DEFAULT);
  129. $feed->_mute(Minz_Request::paramBoolean('mute'));
  130. $feed->_attribute('read_upon_gone', Minz_Request::paramTernary('read_upon_gone'));
  131. $feed->_attribute('mark_updated_article_unread', Minz_Request::paramTernary('mark_updated_article_unread'));
  132. $feed->_attribute('read_upon_reception', Minz_Request::paramTernary('read_upon_reception'));
  133. $feed->_attribute('clear_cache', Minz_Request::paramTernary('clear_cache'));
  134. if (Minz_Request::hasParam('show_unread_count')) {
  135. $feed->_attribute('show_unread_count', Minz_Request::paramTernary('show_unread_count'));
  136. }
  137. $feed->_attribute('display_enclosures', Minz_Request::paramTernary('display_enclosures'));
  138. $keep_max_n_unread = Minz_Request::paramTernary('keep_max_n_unread') === true ? Minz_Request::paramInt('keep_max_n_unread') : null;
  139. $feed->_attribute('keep_max_n_unread', $keep_max_n_unread >= 0 ? $keep_max_n_unread : null);
  140. $read_when_same_title_in_feed = Minz_Request::paramString('read_when_same_title_in_feed');
  141. if ($read_when_same_title_in_feed === '') {
  142. $read_when_same_title_in_feed = null;
  143. } else {
  144. $read_when_same_title_in_feed = (int)$read_when_same_title_in_feed;
  145. if ($read_when_same_title_in_feed <= 0) {
  146. $read_when_same_title_in_feed = false;
  147. }
  148. }
  149. $feed->_attribute('read_when_same_title_in_feed', $read_when_same_title_in_feed);
  150. $cookie = Minz_Request::paramString('curl_params_cookie', plaintext: true);
  151. $cookie_file = Minz_Request::paramBoolean('curl_params_cookiefile');
  152. $max_redirs = Minz_Request::paramInt('curl_params_redirects');
  153. $useragent = Minz_Request::paramString('curl_params_useragent', plaintext: true);
  154. $proxy_address = Minz_Request::paramString('curl_params', plaintext: true);
  155. $proxy_address = preg_replace('#^.*://#', '', $proxy_address) ?? $proxy_address;
  156. $proxy_type = Minz_Request::paramIntNull('proxy_type');
  157. $request_method = Minz_Request::paramString('curl_method', plaintext: true);
  158. $request_fields = Minz_Request::paramString('curl_fields', plaintext: true);
  159. $headers = Minz_Request::paramTextToArray('http_headers', plaintext: true);
  160. $opts = [];
  161. if ($proxy_type !== null) {
  162. $opts[CURLOPT_PROXYTYPE] = $proxy_type;
  163. }
  164. if ($proxy_address !== '') {
  165. $opts[CURLOPT_PROXY] = $proxy_address;
  166. }
  167. if ($cookie !== '') {
  168. $opts[CURLOPT_COOKIE] = $cookie;
  169. }
  170. if ($cookie_file) {
  171. // Pass empty cookie file name to enable the libcurl cookie engine
  172. // without reading any existing cookie data.
  173. $opts[CURLOPT_COOKIEFILE] = '';
  174. }
  175. if ($max_redirs != 0) {
  176. $opts[CURLOPT_MAXREDIRS] = $max_redirs;
  177. $opts[CURLOPT_FOLLOWLOCATION] = true;
  178. }
  179. if ($useragent !== '') {
  180. $opts[CURLOPT_USERAGENT] = $useragent;
  181. }
  182. if ($request_method === 'POST') {
  183. $opts[CURLOPT_POST] = true;
  184. if ($request_fields !== '') {
  185. $opts[CURLOPT_POSTFIELDS] = $request_fields;
  186. if (json_decode($request_fields, true) !== null) {
  187. $opts[CURLOPT_HTTPHEADER] = ['Content-Type: application/json'];
  188. }
  189. }
  190. }
  191. $headers = array_filter($headers, fn(string $header): bool => trim($header) !== '');
  192. if (!empty($headers)) {
  193. $opts[CURLOPT_HTTPHEADER] = array_merge($headers, $opts[CURLOPT_HTTPHEADER] ?? []);
  194. $opts[CURLOPT_HTTPHEADER] = array_unique($opts[CURLOPT_HTTPHEADER]);
  195. }
  196. $feed->_attribute('curl_params', empty($opts) ? null : FreshRSS_http_Util::sanitizeCurlParams($opts));
  197. $feed->_attribute('content_action', Minz_Request::paramString('content_action', true) ?: 'replace');
  198. $feed->_attribute('ssl_verify', Minz_Request::paramTernary('ssl_verify'));
  199. $timeout = Minz_Request::paramInt('timeout');
  200. $feed->_attribute('timeout', $timeout > 0 ? $timeout : null);
  201. if (Minz_Request::paramBoolean('use_default_purge_options')) {
  202. $feed->_attribute('archiving', null);
  203. } else {
  204. if (Minz_Request::paramBoolean('enable_keep_max')) {
  205. $keepMax = Minz_Request::paramInt('keep_max') ?: FreshRSS_Feed::ARCHIVING_RETENTION_COUNT_LIMIT;
  206. } else {
  207. $keepMax = false;
  208. }
  209. if (Minz_Request::paramBoolean('enable_keep_period')) {
  210. $keepPeriod = FreshRSS_Feed::ARCHIVING_RETENTION_PERIOD;
  211. if (is_numeric(Minz_Request::paramString('keep_period_count')) && preg_match('/^PT?1[YMWDH]$/', Minz_Request::paramString('keep_period_unit'))) {
  212. $keepPeriod = str_replace('1', Minz_Request::paramString('keep_period_count'), Minz_Request::paramString('keep_period_unit'));
  213. }
  214. } else {
  215. $keepPeriod = false;
  216. }
  217. $feed->_attribute('archiving', [
  218. 'keep_period' => $keepPeriod,
  219. 'keep_max' => $keepMax,
  220. 'keep_min' => Minz_Request::paramInt('keep_min'),
  221. 'keep_favourites' => Minz_Request::paramBoolean('keep_favourites'),
  222. 'keep_labels' => Minz_Request::paramBoolean('keep_labels'),
  223. 'keep_unreads' => Minz_Request::paramBoolean('keep_unreads'),
  224. ]);
  225. }
  226. $feed->_filtersAction('read', Minz_Request::paramTextToArray('filteractions_read', plaintext: true));
  227. $feed->_kind(Minz_Request::paramInt('feed_kind') ?: FreshRSS_Feed::KIND_RSS);
  228. if ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH || $feed->kind() === FreshRSS_Feed::KIND_XML_XPATH) {
  229. $xPathSettings = [];
  230. if (Minz_Request::paramString('xPathItem') != '')
  231. $xPathSettings['item'] = Minz_Request::paramString('xPathItem', true);
  232. if (Minz_Request::paramString('xPathItemTitle') != '')
  233. $xPathSettings['itemTitle'] = Minz_Request::paramString('xPathItemTitle', true);
  234. if (Minz_Request::paramString('xPathItemContent') != '')
  235. $xPathSettings['itemContent'] = Minz_Request::paramString('xPathItemContent', true);
  236. if (Minz_Request::paramString('xPathItemUri') != '')
  237. $xPathSettings['itemUri'] = Minz_Request::paramString('xPathItemUri', true);
  238. if (Minz_Request::paramString('xPathItemAuthor') != '')
  239. $xPathSettings['itemAuthor'] = Minz_Request::paramString('xPathItemAuthor', true);
  240. if (Minz_Request::paramString('xPathItemTimestamp') != '')
  241. $xPathSettings['itemTimestamp'] = Minz_Request::paramString('xPathItemTimestamp', true);
  242. if (Minz_Request::paramString('xPathItemTimeFormat') != '')
  243. $xPathSettings['itemTimeFormat'] = Minz_Request::paramString('xPathItemTimeFormat', true);
  244. if (Minz_Request::paramString('xPathItemThumbnail') != '')
  245. $xPathSettings['itemThumbnail'] = Minz_Request::paramString('xPathItemThumbnail', true);
  246. if (Minz_Request::paramString('xPathItemCategories') != '')
  247. $xPathSettings['itemCategories'] = Minz_Request::paramString('xPathItemCategories', true);
  248. if (Minz_Request::paramString('xPathItemUid') != '')
  249. $xPathSettings['itemUid'] = Minz_Request::paramString('xPathItemUid', true);
  250. if (!empty($xPathSettings))
  251. $feed->_attribute('xpath', $xPathSettings);
  252. } elseif ($feed->kind() === FreshRSS_Feed::KIND_JSON_DOTNOTATION || $feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH_JSON_DOTNOTATION) {
  253. $jsonSettings = [];
  254. if (Minz_Request::paramString('jsonFeedTitle') !== '') {
  255. $jsonSettings['feedTitle'] = Minz_Request::paramString('jsonFeedTitle', true);
  256. }
  257. if (Minz_Request::paramString('jsonItem') !== '') {
  258. $jsonSettings['item'] = Minz_Request::paramString('jsonItem', true);
  259. }
  260. if (Minz_Request::paramString('jsonItemTitle') !== '') {
  261. $jsonSettings['itemTitle'] = Minz_Request::paramString('jsonItemTitle', true);
  262. }
  263. if (Minz_Request::paramString('jsonItemContent') !== '') {
  264. $jsonSettings['itemContent'] = Minz_Request::paramString('jsonItemContent', true);
  265. }
  266. if (Minz_Request::paramString('jsonItemUri') !== '') {
  267. $jsonSettings['itemUri'] = Minz_Request::paramString('jsonItemUri', true);
  268. }
  269. if (Minz_Request::paramString('jsonItemAuthor') !== '') {
  270. $jsonSettings['itemAuthor'] = Minz_Request::paramString('jsonItemAuthor', true);
  271. }
  272. if (Minz_Request::paramString('jsonItemTimestamp') !== '') {
  273. $jsonSettings['itemTimestamp'] = Minz_Request::paramString('jsonItemTimestamp', true);
  274. }
  275. if (Minz_Request::paramString('jsonItemTimeFormat') !== '') {
  276. $jsonSettings['itemTimeFormat'] = Minz_Request::paramString('jsonItemTimeFormat', true);
  277. }
  278. if (Minz_Request::paramString('jsonItemThumbnail') !== '') {
  279. $jsonSettings['itemThumbnail'] = Minz_Request::paramString('jsonItemThumbnail', true);
  280. }
  281. if (Minz_Request::paramString('jsonItemCategories') !== '') {
  282. $jsonSettings['itemCategories'] = Minz_Request::paramString('jsonItemCategories', true);
  283. }
  284. if (Minz_Request::paramString('jsonItemUid') !== '') {
  285. $jsonSettings['itemUid'] = Minz_Request::paramString('jsonItemUid', true);
  286. }
  287. if (!empty($jsonSettings)) {
  288. $feed->_attribute('json_dotnotation', $jsonSettings);
  289. }
  290. if (Minz_Request::paramString('xPathToJson', plaintext: true) !== '') {
  291. $feed->_attribute('xPathToJson', Minz_Request::paramString('xPathToJson', plaintext: true));
  292. }
  293. }
  294. $conditions = Minz_Request::paramTextToArray('path_entries_conditions', plaintext: true);
  295. $conditions = array_filter($conditions, fn(string $condition): bool => trim($condition) !== '');
  296. $feed->_attribute('path_entries_conditions', empty($conditions) ? null : $conditions);
  297. $feed->_attribute('path_entries_filter', Minz_Request::paramString('path_entries_filter', true));
  298. // @phpstan-ignore offsetAccess.nonOffsetAccessible
  299. $favicon_path = isset($_FILES['newFavicon']) ? $_FILES['newFavicon']['tmp_name'] : '';
  300. // @phpstan-ignore offsetAccess.nonOffsetAccessible
  301. $favicon_size = isset($_FILES['newFavicon']) ? $_FILES['newFavicon']['size'] : 0;
  302. $favicon_uploaded = $favicon_path !== '';
  303. $resetFavicon = Minz_Request::paramBoolean('resetFavicon');
  304. if ($resetFavicon) {
  305. $feed->resetCustomFavicon();
  306. }
  307. $defaultSortOrder = Minz_Request::paramString('defaultSortOrder', plaintext: true);
  308. if (str_ends_with($defaultSortOrder, '_asc')) {
  309. $feed->_attribute('defaultOrder', 'ASC');
  310. $defaultSortOrder = substr($defaultSortOrder, 0, -strlen('_asc'));
  311. } elseif (str_ends_with($defaultSortOrder, '_desc')) {
  312. $feed->_attribute('defaultOrder', 'DESC');
  313. $defaultSortOrder = substr($defaultSortOrder, 0, -strlen('_desc'));
  314. } else {
  315. $feed->_attribute('defaultOrder');
  316. }
  317. if (in_array($defaultSortOrder, ['id', 'date', 'link', 'title', 'length', 'rand'], true)) {
  318. $feed->_attribute('defaultSort', $defaultSortOrder);
  319. } else {
  320. $feed->_attribute('defaultSort');
  321. }
  322. $values = [
  323. 'name' => Minz_Request::paramString('name'),
  324. 'kind' => $feed->kind(),
  325. 'description' => FreshRSS_SimplePieCustom::sanitizeHTML(Minz_Request::paramString('description', true)),
  326. 'website' => FreshRSS_http_Util::checkUrl(Minz_Request::paramString('website')) ?: '',
  327. 'url' => FreshRSS_http_Util::checkUrl(Minz_Request::paramString('url')) ?: '',
  328. 'category' => Minz_Request::paramInt('category'),
  329. 'pathEntries' => Minz_Request::paramString('path_entries'),
  330. 'priority' => Minz_Request::paramTernary('priority') === null ? FreshRSS_Feed::PRIORITY_MAIN_STREAM : Minz_Request::paramInt('priority'),
  331. 'httpAuth' => $httpAuth,
  332. 'ttl' => $feed->ttl(true),
  333. 'attributes' => $feed->attributes(),
  334. ];
  335. invalidateHttpCache();
  336. $from = Minz_Request::paramString('from');
  337. switch ($from) {
  338. case 'stats':
  339. $url_redirect = ['c' => 'stats', 'a' => 'idle', 'params' => ['id' => $id, 'from' => 'stats']];
  340. break;
  341. case 'normal':
  342. case 'reader':
  343. $get = Minz_Request::paramString('get');
  344. if ($get !== '') {
  345. $url_redirect = ['c' => 'index', 'a' => $from, 'params' => ['id' => $id, 'get' => $get]];
  346. } else {
  347. $url_redirect = ['c' => 'index', 'a' => $from, 'params' => ['id' => $id]];
  348. }
  349. break;
  350. case 'index':
  351. $url_redirect = ['c' => 'subscription', 'params' => ['id' => $id, 'error' => Minz_Request::paramBoolean('error') ? 1 : 0]];
  352. break;
  353. default:
  354. $url_redirect = ['c' => 'subscription', 'a' => 'feed', 'params' => ['id' => $id]];
  355. }
  356. if ($favicon_uploaded && !$resetFavicon) {
  357. $max_size = FreshRSS_Context::systemConf()->limits['max_favicon_upload_size'];
  358. if ($favicon_size > $max_size) {
  359. Minz_Request::bad(_t('feedback.sub.feed.favicon.too_large', format_bytes($max_size)), $url_redirect);
  360. return;
  361. }
  362. try {
  363. $feed->setCustomFavicon(tmpPath: is_string($favicon_path) ? $favicon_path : '', values: $values);
  364. } catch (FreshRSS_UnsupportedImageFormat_Exception $_) {
  365. Minz_Request::bad(_t('feedback.sub.feed.favicon.unsupported_format'), $url_redirect);
  366. return;
  367. } catch (FreshRSS_Feed_Exception $_) {
  368. Minz_Request::bad(_t('feedback.sub.feed.error'), $url_redirect);
  369. return;
  370. }
  371. Minz_Request::good(
  372. _t('feedback.sub.feed.updated'),
  373. $url_redirect,
  374. showNotification: FreshRSS_Context::userConf()->good_notification_timeout > 0
  375. );
  376. } elseif ($values['url'] != '' && $feedDAO->updateFeed($id, $values) !== false) {
  377. $feed->_categoryId($values['category']);
  378. // update url and website values for faviconPrepare
  379. $feed->_url($values['url'], false);
  380. $feed->_website($values['website'], false);
  381. $feed->faviconPrepare();
  382. Minz_Request::good(
  383. _t('feedback.sub.feed.updated'),
  384. $url_redirect,
  385. showNotification: FreshRSS_Context::userConf()->good_notification_timeout > 0
  386. );
  387. } else {
  388. if ($values['url'] == '') {
  389. Minz_Log::warning('Invalid feed URL!');
  390. }
  391. Minz_Request::bad(_t('feedback.sub.feed.error'), $url_redirect);
  392. }
  393. }
  394. }
  395. public function viewFilterAction(): void {
  396. $id = Minz_Request::paramInt('id');
  397. if ($id === 0) {
  398. Minz_Error::error(400);
  399. return;
  400. }
  401. $filteractions = Minz_Request::paramTextToArray('filteractions_read', plaintext: true);
  402. $filteractions = array_map(fn(string $action): string => trim($action), $filteractions);
  403. $filteractions = array_filter($filteractions, fn(string $action): bool => $action !== '');
  404. $actionsSearch = new FreshRSS_BooleanSearch('', operator: 'AND');
  405. foreach ($filteractions as $action) {
  406. $actionSearch = new FreshRSS_BooleanSearch($action, operator: 'OR');
  407. if ($actionSearch->toString() === '') {
  408. continue;
  409. }
  410. $actionsSearch->add($actionSearch);
  411. }
  412. $search = new FreshRSS_BooleanSearch('');
  413. $search->add(new FreshRSS_Search("f:$id"));
  414. $search->add($actionsSearch);
  415. Minz_Request::forward([
  416. 'c' => 'index',
  417. 'a' => 'index',
  418. 'params' => [
  419. 'search' => $search->toString(),
  420. ],
  421. ], redirect: true);
  422. }
  423. /**
  424. * This action displays the bookmarklet page.
  425. */
  426. public function bookmarkletAction(): void {
  427. FreshRSS_View::prependTitle(_t('sub.title.subscription_tools') . ' . ');
  428. }
  429. /**
  430. * This action displays the page to add a new feed
  431. */
  432. public function addAction(): void {
  433. FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js')));
  434. FreshRSS_View::prependTitle(_t('sub.title.add') . ' . ');
  435. }
  436. }