Explorar o código

Remove core extensions Google Groups and Tumblr (#5457)

* Remove core extensions Google Groups and Tumblr
* Google Groups seems to have remove support for RSS/ATOM https://github.com/FreshRSS/FreshRSS/pull/2838 (see e.g. https://www.theregister.com/2021/08/16/google_groups_rss/ )
* Tumblr seems to have fixed their RSS/ATOM post-GDPR https://github.com/FreshRSS/FreshRSS/pull/1924

So for both of thems, the extensions have become irrelevant.

* Cleaning
Alexandre Alapetite %!s(int64=2) %!d(string=hai) anos
pai
achega
2f5ef39cf2

+ 0 - 2
config.default.php

@@ -189,8 +189,6 @@ return array(
 
 	# List of enabled FreshRSS extensions.
 	'extensions_enabled' => [
-		'Google-Groups' => true,
-		'Tumblr-GDPR' => true,
 	],
 
 	# Disable self-update,

+ 0 - 2
docs/en/admins/15_extensions.md

@@ -48,6 +48,4 @@ metadata.json:
 
 See folder: `.lib/core-extensions`
 
-Two system extensions are already pre-installed: `Google-Groups` and `Tumblr-GDPR`.
-
 Important: do not install your chosen extensions here!

+ 0 - 3
lib/core-extensions/Google-Groups/README.md

@@ -1,3 +0,0 @@
-# Google Groups
-
-Needed for discovering RSS feeds from [Google Groups](https://groups.google.com).

+ 0 - 11
lib/core-extensions/Google-Groups/extension.php

@@ -1,11 +0,0 @@
-<?php
-class GoogleGroupsExtension extends Minz_Extension {
-	/** @return void */
-	public function init() {
-		$this->registerHook('check_url_before_add', array('GoogleGroupsExtension', 'findFeed'));
-	}
-
-	public static function findFeed(string $url): string {
-		return preg_replace('%^(https?://groups.google.com/forum)/#!forum/(.+)$%i', '$1/feed/$2/msgs/rss.xml', $url) ?? '';
-	}
-}

+ 0 - 8
lib/core-extensions/Google-Groups/metadata.json

@@ -1,8 +0,0 @@
-{
-	"name": "Google-Groups",
-	"author": "Alkarex",
-	"description": "To discover RSS feeds for Google Groups",
-	"version": 1.0,
-	"entrypoint": "GoogleGroups",
-	"type": "system"
-}

+ 0 - 4
lib/core-extensions/Tumblr-GDPR/README.md

@@ -1,4 +0,0 @@
-# Tumblr-GDPR
-
-Needed for accessing [Tumblr](https://www.tumblr.com/) RSS feeds from the European Union:
-bypass the [GPDR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) check, implying consent.

+ 0 - 14
lib/core-extensions/Tumblr-GDPR/extension.php

@@ -1,14 +0,0 @@
-<?php
-
-class TumblrGdprExtension extends Minz_Extension {
-	/** @return void */
-	public function init() {
-		$this->registerHook('simplepie_before_init', array('TumblrGdprExtension', 'curlHook'));
-	}
-
-	public static function curlHook(SimplePie $simplePie, FreshRSS_Feed $feed): void {
-		if (preg_match('#^https?://[a-zA-Z_0-9-]+.tumblr.com/#i', $feed->url())) {
-			$simplePie->set_useragent(FRESHRSS_USERAGENT . ' like Baiduspider');
-		}
-	}
-}

+ 0 - 8
lib/core-extensions/Tumblr-GDPR/metadata.json

@@ -1,8 +0,0 @@
-{
-	"name": "Tumblr-GDPR",
-	"author": "Alkarex",
-	"description": "Bypass Tumblr’ GPDR check (implying consent) for the European Union",
-	"version": 1.0,
-	"entrypoint": "TumblrGdpr",
-	"type": "system"
-}