diff options
| author | 2020-03-22 16:59:39 +0100 | |
|---|---|---|
| committer | 2020-03-22 16:59:39 +0100 | |
| commit | daa4922d908fb9ad5d973c597d0c60f769236c3e (patch) | |
| tree | 3f2fc0a112cd3d4eb9024d9591feca59be5063fb /lib/core-extensions/Google-Groups/extension.php | |
| parent | cd49e9819bea35a4db05e3e76910b739898c2219 (diff) | |
Add core extension for Google Groups (#2838)
* Add core extension for Google Groups
#Fix https://github.com/FreshRSS/FreshRSS/issues/2835
Add ability to discover RSS feeds for Google Groups
Based on https://github.com/FreshRSS/FreshRSS/pull/2837
* Allow HTTP in addition of HTTPS
Diffstat (limited to 'lib/core-extensions/Google-Groups/extension.php')
| -rw-r--r-- | lib/core-extensions/Google-Groups/extension.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/core-extensions/Google-Groups/extension.php b/lib/core-extensions/Google-Groups/extension.php new file mode 100644 index 000000000..656bf9b8f --- /dev/null +++ b/lib/core-extensions/Google-Groups/extension.php @@ -0,0 +1,10 @@ +<?php +class GoogleGroupsExtension extends Minz_Extension { + public function init() { + $this->registerHook('check_url_before_add', array('GoogleGroupsExtension', 'findFeed')); + } + + public static function findFeed($url) { + return preg_replace('%^(https?://groups.google.com/forum)/#!forum/(.+)$%i', '$1/feed/$2/msgs/rss.xml', $url); + } +} |
