Commit Graph

521 Commits

Author SHA1 Message Date
DJ_TBX 9d69fd2a56 Fix MySQL search Queries
Add the missing space between "AND" and "MATCH" in MySQL search queries
2022-07-04 00:17:01 +03:00
Andrew Dolgov 50f014e52d
implement native fulltext search on mysql 2022-06-19 22:21:54 +03:00
Andrew Dolgov cf1eaeedf3
* add UserHelper methods to manipulate user database (add, modify, delete)
* expose said methods via CLI (update.php)
 * fix several invocations of deprecated functions
 * set stricter type hints on several method arguments
2022-06-10 13:39:00 +03:00
David Edler de1e218a83
various fixes vor php 8.1 compatibility
Cherry-picked from https://git-gitea.tt-rss.org/fox/tt-rss/pulls/56,
while excluding changes in vendor/ (causes compatiblity issues with
PHP<8 [1]) and strftime-related ones (already re-applied in
https://git-gitea.tt-rss.org/fox/tt-rss/pulls/66).

[1] https://community.tt-rss.org/t/support-for-php-8-1/5089/9
2022-03-09 00:46:15 +08:00
Andrew Dolgov f7e2f62022 fix Feeds::_get_counters() used improperly as a replacement for
getFeedUnread()
2022-02-20 12:48:38 +03:00
Andrew Dolgov 77f39d65b5 * Feeds::_get_counters - fix retrieving unread for tags
* mark several symbols as @deprecated properly
 * replace uses of (deprecated) getFeedUnread() with Feeds::_get_counters()
2022-02-20 11:04:40 +03:00
Schrottfresse 931e33c381 Add workaround for boolean values being intergers with MySQL/PHP 8.1 2022-01-28 08:37:29 +01:00
Andrew Dolgov c3482fbe6b generate a warning if plugin-generated content of HOOK_ARTICLE_BUTTON or _LEFT_BUTTON can't be parsed as valid XML 2022-01-06 10:37:03 +03:00
Andrew Dolgov 6971ca08b2 remove deprecated LOG_ constants 2021-12-23 17:32:27 +03:00
Andrew Dolgov 720b318796 * fox.form.Select: add several properties allowing it to better
imitate other controls like DropDownButton, etc.
 * rework several main toolbar items to use fox.form.Select instead of
other controls
 * replace HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM with
HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM2 because of markup change (option
instead of menuitem)
 * PluginHost: add some explicit typecasts to make intellephense shut up
2021-12-14 21:53:45 +03:00
wn_ 0726a9d820 Handle another potential 'SUM()' null situation in Feeds. 2021-12-14 12:50:53 +00:00
wn_ ddc81b2c89 Add a note on why ed74c43f18 was needed. 2021-12-14 12:47:25 +00:00
wn_ ed74c43f18 Handle the admin user not having any entries in 'Feeds::_get_global_unread'. 2021-12-14 12:06:32 +00:00
Andrew Dolgov a201e10ee0 Revert "various fixes vor php 8.1 compatibility"
This reverts commit 14027ae04e.
2021-12-01 13:37:35 +03:00
David Edler 14027ae04e various fixes vor php 8.1 compatibility 2021-11-30 21:50:09 +01:00
Andrew Dolgov 409c63dcf8 remove mixed type hints from function arguments because we still support PHP7 2021-11-29 12:30:33 +03:00
Andrew Dolgov 28fb571dca * fix showing headlines for tag-based virtual feeds
* API: allow retrieving headlines for tag-based feeds (bump api level to 18)
2021-11-29 10:20:13 +03:00
Andrew Dolgov 2b4ba59a79 feeds/add: force cast category id to integer 2021-11-19 17:02:25 +03:00
wn_ d532eb773b Switch from null to false as the default for missing bool params. 2021-11-18 18:25:04 +00:00
wn_ 2422aae577 Consistently handle param string to bool conversions in handlers. 2021-11-18 18:09:47 +00:00
Andrew Dolgov b2ffc8c2e3 _format_headlines_list: fix phpstan warning properly 2021-11-18 11:03:26 +03:00
wn_ 1ec003ce35 Typing IHandler methods, typing Handler_Public, fix type of $feed_id (might be tag). 2021-11-13 14:05:48 +00:00
wn_ 25775bb407 Fix type of 'check_first_id' in Feeds '_format_headlines_list'. 2021-11-13 04:16:36 +00:00
wn_ 763515de79 Address PHPStan warnings in 'classes/feeds.php'.
Also some minor related tweaks in other classes.
2021-11-12 04:48:06 +00:00
wn_ 5606e38bff Update signature of handler 'csrf_ignore' to include types. 2021-11-12 02:01:31 +00:00
wn_ 57bf56f794 Address PHPStan warnings in 'classes/article.php'.
Also related changes in some other classes.
2021-11-12 01:50:40 +00:00
wn_ f704d25ab1 Address PHPStan warnings in 'classes/timehelper.php'. 2021-11-11 20:12:47 +00:00
wn_ 03495c11ed Address PHPStan warnings in 'classes/sanitizer.php'.
This also includes some minor tweaks to things that call 'Sanitizer::sanitize()'.
2021-11-11 19:59:25 +00:00
Andrew Dolgov 9e8d69739f add two helper account access levels:
- read only - can't subscribe to more feeds, feed updates are skipped
 - disabled - can't login
define used access levels as UserHelper constants and refactor code to
use them instead of hardcoded numbers
2021-11-10 20:44:51 +03:00
wn_ 72cf4f1f0d Address PHPStan warning in 'classes/feeds.php'.
------ ------------------------------------
Line   classes/feeds.php
------ ------------------------------------
8      Property Feeds::$params is unused.
------ ------------------------------------
2021-11-01 21:10:27 +00:00
Andrew Dolgov 76d8b1bf6f HOOK_ARTICLE_BUTTON/HOOK_ARTICLE_LEFT_BUTTON: only try to parse markup if its actually there 2021-10-26 15:45:12 +03:00
Andrew Dolgov 933913410c css: make plugin button container a flexbox
backend: pass plugin button generated code through domdocument to ensure
its correctness; set data-plugin-name attribute on children to make
them sortable via css
2021-10-24 20:11:49 +03:00
Andrew Dolgov 41245da8a6 pluginhost: update comments for HOOK_ constants to use phpdoc syntax; add HOOK_PRE_SUBSCRIBE 2021-10-22 13:24:10 +03:00
Andrew Dolgov 145fc31625 feed tree context menu: add an entry to open originating website 2021-10-10 22:08:17 +03:00
Andrew Dolgov 8ed927dbd2 OPML: multiple fixes
- remove unused integer indexes when exporting filters as JSON
 - fix warning when importing filters without rules
 - properly assign category IDs for category filter rules
 - fix warning: check if outline attributes like xmlUrl are set before trying to use them
 - fix warning: don't try to use libxml_disable_entity_loader on PHP 8
2021-09-08 09:04:15 +03:00
Andrew Dolgov b2f888e386 include archived articles (which lack associated feed id) when browsing by tag 2021-05-07 19:15:10 +03:00
wn_ 5d5c034a90 Adjust quotation marks in search query before 'str_getcsv'.
This moves a potential first quotation mark to before the associated keyword to ensure 'str_getcsv' groups the key and value correctly.  Without this 'str_getcsv' would split on potential spaces within the quoted value.
2021-03-27 00:18:05 +00:00
Andrew Dolgov ac6a59914b nsfw: support API clients 2021-03-07 13:22:38 +03:00
Andrew Dolgov 217922899d set some more type hints 2021-03-06 15:23:54 +03:00
Andrew Dolgov 270f0c3132 general cleanup, set some type hints 2021-03-06 15:19:31 +03:00
Andrew Dolgov 6f93c45c28 use orm in some more places; prevent _get_cat_title from hitting the db for uncategorized 2021-03-02 20:07:31 +03:00
Andrew Dolgov c4eaab8a31 feeds/_add_cat: use ORM 2021-03-02 10:24:15 +03:00
Andrew Dolgov 7cf12233d7 use ORM when subscribing feeds 2021-03-02 10:11:42 +03:00
Andrew Dolgov 2005a7bf4f revise behavior of Feeds::_cat_of 2021-03-02 09:36:44 +03:00
Andrew Dolgov 84d8b08d1f use orm for feed access keys 2021-03-02 08:26:37 +03:00
Andrew Dolgov 031ee47a3e don't try to pass string literal NOW() to ORM as a timestamp 2021-03-01 23:07:20 +03:00
Andrew Dolgov b150e46a52 revert back load_filters-related changes 2021-03-01 22:25:41 +03:00
Andrew Dolgov 56f658711f use orm for a bunch of short feed/cat queries 2021-03-01 20:25:53 +03:00
Andrew Dolgov 8b1a2406e6 userhelper: use orm for a few more user-related things 2021-03-01 19:32:27 +03:00
Andrew Dolgov afc7142250 move all $fetch globals to UrlHelper 2021-02-28 10:12:57 +03:00