Andrew Dolgov
be4e7b1340
fix several issues reported by phpstan
4 years ago
Andrew Dolgov
33fff26869
reinstate HOOK_RENDER_ENCLOSURE
4 years ago
Andrew Dolgov
fc0ebf0891
move bookmarklet-related methods out of public.php into the plugin
4 years ago
Andrew Dolgov
e4609c18ef
* add (disabled) shortcut syntax for plugin methods
...
* add controls shortcut for pluginhandler tags
* add similar shortcut for frontend
* allow plugins to selectively exclude their methods from CSRF checking
4 years ago
Andrew Dolgov
273ada7353
* implement shortcut syntax for exposed plugin methods
...
* move shared article rendering code to share plugin
4 years ago
Andrew Dolgov
257efb43c6
article: unify naming
4 years ago
Andrew Dolgov
a5819569f2
pluginhost: a few more warnings and type hints
4 years ago
Andrew Dolgov
d91eae9c7e
pluginhost: add some type hints
4 years ago
Andrew Dolgov
6e57fd77af
db: add type hints
4 years ago
Andrew Dolgov
a14873d5b4
more hooks, also add type hint for PluginHost::getInstance()
4 years ago
Andrew Dolgov
ca4c93c6b9
pluginhost: note hook function prototypes
4 years ago
Andrew Dolgov
a341a838b1
pluginhost: deny hook registration to plugins which lack relevant implementation methods
4 years ago
Andrew Dolgov
3b52cea811
move some old-style handlers to new callback ones
4 years ago
Andrew Dolgov
1eb1629d9e
pluginhost: rework run_hooks() to be shorter, add callback variant; implement exception handling for both
4 years ago
Andrew Dolgov
20b56b5b23
pluginhost: catch errors while loading plugin source code
4 years ago
Andrew Dolgov
4165834f80
pluginhost: catch fatal errors in plugin init
4 years ago
Andrew Dolgov
c94f1b6ff8
fix some more warnings reported by phpstan
4 years ago
Andrew Dolgov
403dca154c
initial WIP for php8; bump php version requirement to 7.0
4 years ago
Andrew Dolgov
25520e9784
Select... dropdown: replace dijit Select with DropDownButton, simplify layout
...
PluginHost: add HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM
Headlines.onActionChanged: removed
4 years ago
Andrew Dolgov
ee4b7bebe8
pluginhost: load_data: check schema last
4 years ago
Andrew Dolgov
40f38fc87f
pluginhost: load plugin data automatically (also marks load_data method as private)
4 years ago
Andrew Dolgov
6811d0bde2
use self:: in some places to invoke static methods from the same class
4 years ago
Andrew Dolgov
a4525d31b2
replace FALSE with false so that static analyzer shuts up about it
4 years ago
Andrew Dolgov
c3d14e1fa5
- fix multiple vulnerabilities in af_proxy_http
...
- fix vulnerability in rewrite_relative_url() which prevented some URLs from being properly absolutized
- fetch_file_contents: validate all URLs before requesting them
- validate URLs: explicitly whitelist http and https scheme, forbid everything else
- DiskCache/cached_url: only serve whitelisted content types (images, video)
- simplify filename/URL handling code, remove and consolidate some less-used functions
4 years ago
Andrew Dolgov
ddf9227dc4
pluginhost: allow overriding default sort modes via HOOK_HEADLINES_CUSTOM_SORT_MAP etc
4 years ago
Andrew Dolgov
6573541873
* add HOOK_ENCLOSURE_IMPORTED
...
* pass feed id to HOOK_FEED_PARSED
5 years ago
Andrew Dolgov
208e02c47d
PluginHost/save_data: use separate PDO connection to prevent issues with nested transactions
5 years ago
Andrew Dolgov
d15f0349bf
remove hardcoded iframe domain whitelist, make iframe script whitelisting configurable by plugins (HOOK_IFRAME_WHITELISTED)
5 years ago
jc
8fd11fd53a
Add const HOOK_FEED_TREE
5 years ago
jc
a243979aaf
Add const HOOK_FEED_TREE
5 years ago
Andrew Dolgov
3e4701116d
af_readability: add missing file
5 years ago
Andrew Dolgov
865c54abcb
fix get_method_url() to use correct method parameter
5 years ago
Andrew Dolgov
10c63ed582
pluginhost: add helper methods to get private/public pluginmethod endpoint URLs
5 years ago
Andrew Dolgov
7f8946f14e
pluginhost: implement priority-based system for running hooks
5 years ago
Andrew Dolgov
9d852e052c
add HOOK_ARTICLE_IMAGE for Article::get_article_image()
5 years ago
Andrew Dolgov
fdb6066bf6
* HOOK_ENCLOSURE_ENTRY: pass article_id to handler
...
* DiskCache: multiple fixes; support isWritable() for cache entries, set content-disposition for send()
* public/cached_url: allow selecting files from sub-caches other than images
* plugins/Cache_Starred_Images: rework to use DiskCache, can be enabled per-user, properly handles article enclosures, etc
5 years ago
Andrew Dolgov
6955b2e02d
plugins: add HOOK_GET_FULL_TEXT which may be used to provide full text extraction to core code and other plugins, instead of trying to invoke af_readability specifically
6 years ago
Andrew Dolgov
614a4b3b4a
pluginhost: remove plugin gettext helpers (moved to plugin base class)
6 years ago
Andrew Dolgov
c1175070a2
add P_sprintf
6 years ago
Andrew Dolgov
72fcc81919
support per-plugin locale directories
6 years ago
Andrew Dolgov
95f63e121a
note that HOOK_FORMAT_ARTICLE_CDM is dead for now
6 years ago
Andrew Dolgov
a01c33d654
add HOOK_FILTER_TRIGGERED (for filter debugging)
6 years ago
Andrew Dolgov
c10a43069e
debug logging system rework:
...
* support various logging levels per-message
* remove hacks like debug_suppress, DAEMON_EXTENDED_DEBUG, etc
* _debug() is kept as a compatibility shim for plugins
6 years ago
Andrew Dolgov
57932e1837
remove PHPMailer and related directives from config.php-dist; add pluggable Mailer class
6 years ago
Andrew Dolgov
3a0292303e
php: remove trailing whitespaces
6 years ago
Andrew Dolgov
32c0c07cc1
pluginhost: implement basic autoloader for classes bundled with plugins (uses vendor/ layout)
6 years ago
Andrew Dolgov
6fb5f17be6
pluginhost: always return an array in get_all()
7 years ago
Andrew Dolgov
f70d456a5b
Merge branch 'master' of git.tt-rss.org:git/tt-rss into pdo-experimental
7 years ago
Andrew Dolgov
7c6f7bb0aa
fix some minor issues found by code analyzer
7 years ago
Andrew Dolgov
df5d2a0665
pluginhost: do not connect via legacy DB api until requested
...
log all initiated legacy database connections
7 years ago