Commit graph

95 commits

Author SHA1 Message Date
Badet Aurélien c702a0e69f Bridge getExtraInfos (#432)
* add function getExtraInfos() to BridgeAbstract

* replace call to $bridge->getName() and $bridge->getURI() by $bridge->getExtraInfos()

replace call to $bridge->getName() and $bridge->getURI() by $bridge->getExtraInfos() defined by default in BridgeAbstract.
So we could pass additionals ExtraInfos from custom bridges to custom formats.
2016-11-29 00:48:59 +00:00
logmanoriginal d39c1ed63a [index] Add check for 'allow_url_fopen' 2016-11-05 13:09:20 +01:00
logmanoriginal 04a195361a [index] Add check for 'libxml' extension 2016-11-05 13:05:28 +01:00
logmanoriginal 3bcd98404b [index] Add check for correct PHP version 2016-11-05 13:02:48 +01:00
logmanoriginal 5790ebc6ba [index] Initialize variable before using it 2016-10-20 22:12:54 +02:00
logmanoriginal 85149add61 [index] Fixes a bug where requests could result in same cache file names
Previously the cache file name was only build upon bridge
parameters. If two bridges don't make use of any parameter
this would result into equal file names.
2016-10-20 22:03:23 +02:00
logmanoriginal 8fb4db8914 [index] Introduce CACHE_DIR 2016-10-08 16:21:00 +02:00
logmanoriginal 5c309e93dc [cache] Specify cache duration for 'purgeCache' 2016-10-08 16:18:10 +02:00
logmanoriginal 2d56b717cf [FileCache] Add property to define cache folder 2016-10-08 16:03:08 +02:00
logmanoriginal 5de4a59d41 [index] Initialize cache before loading to bridge
Previously BridgeAbstract needed to know which exact implementation
of CacheInterface was used (since we only got one right now its
not a problem). Initializing the cache in index.php instead allows
to change cache types more easily.
2016-10-08 15:29:21 +02:00
logmanoriginal 9ac678aac5 [Cache] Move 'purge' function to implementations
The purge function is cache specific and thus belongs
to the specific implementation.
2016-10-07 22:33:45 +02:00
logmanoriginal b61ea84950 [index] Show debug status on main page 2016-10-02 18:43:20 +02:00
logmanoriginal b32cfd5dc3 [index] Explicitly define DEBUG with Boolean value 2016-10-02 17:16:21 +02:00
logmanoriginal 978e5cdbf5 [index] Define cache even in DEBUG mode 2016-10-02 16:43:08 +02:00
Pierre Mazière 747be13849 [core] extract HTMLUtils methods to make them functions
Methods displayBridgeCard, sanitize, defaultImageSrcTo are now
functions in lib/html.php
getHelperButtinsFormat and getFormHeader are now anonymous functions
defined in displayBridgeCard

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-25 23:58:52 +02:00
Pierre Mazière f1fb95b257 [core] extract BridgeAbstract methods to make them functions
- returnError, returnServerError, returnClientError ,debugMessage are
  moved to lib/error.php

- getContents, getSimpleHTMLDOM, getSimpleHTMLDOMCached are moved to
  lib/contents.php

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-25 23:22:33 +02:00
logmanoriginal 3438b96197 [index] Fix another github URL 2016-09-17 20:21:48 +02:00
Pierre Mazière 2ca7129e22 [core] fix user agent url to rss-bridge github project
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-17 19:37:41 +02:00
logmanoriginal e3392a738b [phpcs] Remove check for Zend OperatorSpacing
This check is not helping as code is quite readable
2016-09-10 21:05:29 +02:00
logmanoriginal ab16af631e [core] Apply some fixes 2016-09-10 21:01:02 +02:00
logmanoriginal a84016bcb6 [core] Rename item getter/setter
getDatas -> getItems
setDatas -> setItems

Note: Bridge->setDatas actually sets data, where Bridge->getItems
only returns items (this is why Bridge->setDatas was not changed)
2016-08-29 19:42:58 +02:00
Pierre Mazière de1b39c8e5 [core + bridges] get rid of loadMetadata
if a bridge needs to modify some of the data that were initialized
there, ::__construct() should be used instead.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-28 13:05:03 +02:00
Pierre Mazière 2670a0e400 [core] get parameters from $_GET rather than $_REQUEST
No need to play with parameters that RSS-Bridge did not ask for

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-25 17:28:47 +02:00
Pierre Mazière 1bb94aecc6 [core] leave $_REQUEST alone
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-25 01:07:49 +02:00
Pierre Mazière b31b6667f6 [core] fix missing filter_input
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 17:22:51 +02:00
Pierre Mazière 3c089c1b11 [core] keep compatibility with nameBridge and nameFormat naming scheme
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 16:10:26 +02:00
Pierre Mazière 7e0ac1a6b6 [core] better use of filter_input
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:42:53 +02:00
Pierre Mazière 0a86d572c2 [core] simplify cache related code and remove misleading comment
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:41:41 +02:00
Pierre Mazière 13285f080a [core] use filter_input() instead of direct access to $_REQUEST
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-23 14:22:02 +02:00
logmanoriginal 251d7646b7 [index] Fix loading of metadata
Re-introduces commit a1257126bc
2016-08-19 14:46:22 +02:00
Pierre Mazière 10cd3a61a9 check for PROXY_NAME definition before using it
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:20:27 +02:00
Pierre Mazière d71674d2ba proxy settings must be the service provider decision
therefore, the provider decides if the service use a
proxy or not, and if users can have the possibility to
disable it on a bridge basis.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
Pierre Mazière 09d4e21bdc possibility to hide proxy address
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
Pierre Mazière 3dd63ab6fd enable proxy usage for individual bridge
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-19 10:19:56 +02:00
logmanoriginal c0b607c841 [index] Fix whitelist default array
WikipediaBridge recently replaced WikipediaENBridge,
WikipediaEOBridge and WikipediaFRBridge
2016-08-07 15:36:50 +02:00
logmanoriginal 3f83763ff9 [index] Don't render 'Show inactive bridges' if non inactive 2016-08-07 15:15:55 +02:00
logmanoriginal 75f7a32b99 [index] Allow hiding of inactive bridges when shown 2016-08-07 15:06:48 +02:00
logmanoriginal a1257126bc [index] Make sure metadata is loaded before requesting data
loadMetadatas must be executed before setDatas to load all
metadatas before using them in collectData (called by setDatas)
2016-08-06 18:38:42 +02:00
Teromene 6b7b38db54 Improved new style. 2016-08-02 22:16:43 +02:00
ORelio a63773178a [Core] Allow IP whitelisting for debug mode
...Because we are never cautious enough
while debugging a live rss-bridge instance.
2016-06-12 22:12:49 +02:00
Teromene d7f079e66b Modified the debug system to use a file as a trigger instead of a URL parameter.
Modified the gitignore accordingly.
2016-03-17 14:36:33 +00:00
teromene@teromene.fr 3e8a7624e1 Added an URL option to activate debug : debug activates all messages, and disables the cache. 2016-03-03 15:26:07 +00:00
ahiles3005 4fac0e382c bug fix: After adding a new bridge, it is not loaded because it was removed from the list of action 2016-03-01 20:39:09 +04:00
Mitsukarenai 9c8f552a2a Remove duplicate cache purge - issue #183 2015-12-06 19:01:56 +01:00
Mitsukarenai b8ec283458 fucked up merge >< 2015-12-06 16:40:13 +01:00
Mitsukarenai 6866e508cb Merge branch 'experimental' of github.com:sebsauvage/rss-bridge 2015-12-06 16:01:30 +01:00
Teromene 1a4a428449 Correction de quelques problèmes avec RSSExpander suite à la migration dans lib/Bridge.
Correction de typos.
Ajout de la possibilité d'utiliser un proxy.
2015-12-06 15:56:39 +01:00
Teromene e582c887fb Ajout du paramètre pattern pour les entrées de type texte, ajout du required côté HTML.
Correction de la page d'accueuil pour qu'elle soit conforme aux standards du W3C.
Correction de la regex de listage des fichiers pour qu'elle ignore les sauvegardes.
Ajout d'un nettoyeur HTML, par défaut.
2015-12-06 15:56:39 +01:00
teromene 38829e7739 Little refactoring to reduce logic on index.php.
Moved RssExpander as a core logic system to lib/Bridge.php

Signed-off-by: teromene <teromene@teromene.fr>
2015-12-06 15:56:39 +01:00
teromene 715ad3bf3f Checking if the parameter mode has a name, same for exampleValue.
Change the default bridge name.

Signed-off-by: teromene <teromene@teromene.fr>
2015-12-06 15:56:39 +01:00