1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 20:14:10 +02:00

Correction de quelques bugs dans les bridges, qui apparaissent à cause du fait qu'ils sont tous instanciés lors du chargement de tout les bridges.

Ré-ajout et ré-utilisation de getName et getURI, qui permettent d'avoir des élements dynamiques.
Changement en public de certaines valeurs.
Changement du nom de certaines constantes, déja utilisés.

Signed-off-by: teromene <teromene@teromene.fr>
This commit is contained in:
teromene
2015-11-03 23:05:10 +00:00
committed by Mitsukarenai
parent 11ad75c7e6
commit 2d526f4e0a
13 changed files with 75 additions and 17 deletions

View File

@@ -30,6 +30,18 @@ class ABCTabsBridge extends BridgeAbstract{
}
}
public function getName() {
return "ABC Tabs Bridge";
}
public function getURI() {
return "http://www.abc-tabs.com/";
}
public function getCacheDuration(){
return 3600; // 1 hour
}

View File

@@ -39,6 +39,17 @@ class AcrimedBridge extends BridgeAbstract{
}
public function getName() {
return "Acrimed Bridge";
}
public function getURI() {
return "http://www.acrimed.org/";
}
public function getCacheDuration(){
return 3600*2; // 2 hours

View File

@@ -55,6 +55,18 @@ class DemoBridge extends BridgeAbstract{
}
public function getName() {
return "DemoBridge";
}
public function getURI() {
return "http://github.com/sebsauvage/rss-bridge";
}
public function getCacheDuration(){
return 3600; // 1 hour
}

View File

@@ -12,7 +12,7 @@
* @use2(n="max number of returned items")
*/
define(GIPHY_LIMIT, 10);
define('GIPHY_LIMIT', 10);
class GiphyBridge extends BridgeAbstract{

View File

@@ -1,7 +1,7 @@
<?php
require_once 'bridges/RssExpander.php';
define("SEXE", "http://sexes.blogs.liberation.fr");
define("RSS", "http://sexes.blogs.liberation.fr/feeds/");
define("SEXE_FEED", "http://sexes.blogs.liberation.fr/feeds/");
/**
* As it seems that Les 400 culs currently offer a full feed, we won't change it content here.
* But I'm ready for the day where it will ... again ... provide some truncated content
@@ -20,7 +20,7 @@ class Les400Culs extends RssExpander{
public function collectData(array $param){
$param['url'] = RSS;
$param['url'] = SEXE_FEED;
parent::collectData($param);
}

View File

@@ -9,9 +9,9 @@
*/
abstract class RssExpander extends HttpCachingBridgeAbstract{
protected $name;
private $uri;
private $description;
public $name;
public $uri;
public $description;
public function collectData(array $param){
if (empty($param['url'])) {
$this->returnError('There is no $param[\'url\'] for this RSS expander', 404);
@@ -65,4 +65,4 @@ abstract class RssExpander extends HttpCachingBridgeAbstract{
public function getDescription() {
return $this->description;
}
}
}

View File

@@ -14,7 +14,7 @@
class SoundCloudBridge extends BridgeAbstract{
private $request;
private $name;
public $name;
const CLIENT_ID = '0aca19eae3843844e4053c6d8fdb7875';
public function collectData(array $param){

View File

@@ -10,11 +10,11 @@
*/
require_once 'bridges/RssExpander.php';
define("THE_OATMEAL", "http://theoatmeal.com/");
define("RSS", "http://feeds.feedburner.com/oatmealfeed");
define("THE_OATMEAL_RSS", "http://feeds.feedburner.com/oatmealfeed");
class TheOatmealBridge extends RssExpander{
public function collectData(array $param){
$param['url'] = RSS;
$param['url'] = THE_OATMEAL_RSS;
parent::collectData($param);
}

View File

@@ -14,7 +14,7 @@
class WhydBridge extends BridgeAbstract{
private $request;
private $name;
public $name;
public function collectData(array $param){
$html = '';

View File

@@ -14,7 +14,7 @@
class WordPressBridge extends BridgeAbstract {
private $url;
private $name;
public $name;
public function collectData(array $param) {
$this->processParams($param);

View File

@@ -10,8 +10,8 @@ define('WORLD_OF_TANKS', 'http://worldoftanks.eu/');
define('NEWS', '/news/');
class WorldOfTanks extends HttpCachingBridgeAbstract{
private $lang = "fr";
private $uri = WORLD_OF_TANKS;
private $name = 'World of tanks news';
public $uri = WORLD_OF_TANKS;
public $name = 'World of tanks news';
public function collectData(array $param){
if (!empty($param['lang'])) {