2013-08-11 15:30:41 +04:00
|
|
|
<?php
|
2018-11-15 22:52:17 +03:00
|
|
|
/**
|
|
|
|
* This file is part of RSS-Bridge, a PHP project capable of generating RSS and
|
|
|
|
* Atom feeds for websites that don't have one.
|
|
|
|
*
|
|
|
|
* For the full license information, please view the UNLICENSE file distributed
|
|
|
|
* with this source code.
|
|
|
|
*
|
|
|
|
* @package Core
|
|
|
|
* @license http://unlicense.org/ UNLICENSE
|
|
|
|
* @link https://github.com/rss-bridge/rss-bridge
|
|
|
|
*/
|
2013-08-11 15:30:41 +04:00
|
|
|
|
2018-11-15 22:52:17 +03:00
|
|
|
/** Path to the root folder of RSS-Bridge (where index.php is located) */
|
|
|
|
define('PATH_ROOT', __DIR__ . '/../');
|
|
|
|
|
|
|
|
/** Path to the core library */
|
2018-11-06 20:44:45 +03:00
|
|
|
define('PATH_LIB', __DIR__ . '/../lib/'); // Path to core library
|
2018-11-15 22:52:17 +03:00
|
|
|
|
|
|
|
/** Path to the vendor library */
|
|
|
|
define('PATH_LIB_VENDOR', __DIR__ . '/../vendor/');
|
|
|
|
|
|
|
|
/** Path to the bridges library */
|
|
|
|
define('PATH_LIB_BRIDGES', __DIR__ . '/../bridges/');
|
|
|
|
|
|
|
|
/** Path to the formats library */
|
|
|
|
define('PATH_LIB_FORMATS', __DIR__ . '/../formats/');
|
|
|
|
|
|
|
|
/** Path to the caches library */
|
|
|
|
define('PATH_LIB_CACHES', __DIR__ . '/../caches/');
|
|
|
|
|
|
|
|
/** Path to the cache folder */
|
|
|
|
define('PATH_CACHE', __DIR__ . '/../cache/');
|
|
|
|
|
|
|
|
/** Path to the whitelist file */
|
|
|
|
define('WHITELIST', __DIR__ . '/../whitelist.txt');
|
|
|
|
|
|
|
|
/** URL to the RSS-Bridge repository */
|
2018-11-06 20:53:35 +03:00
|
|
|
define('REPOSITORY', 'https://github.com/RSS-Bridge/rss-bridge/');
|
2018-11-06 20:24:05 +03:00
|
|
|
|
2018-11-06 21:23:32 +03:00
|
|
|
// Interfaces
|
|
|
|
require_once PATH_LIB . 'BridgeInterface.php';
|
|
|
|
require_once PATH_LIB . 'CacheInterface.php';
|
|
|
|
require_once PATH_LIB . 'FormatInterface.php';
|
|
|
|
|
2018-11-06 20:29:00 +03:00
|
|
|
// Classes
|
2018-12-27 00:41:32 +03:00
|
|
|
require_once PATH_LIB . 'FeedItem.php';
|
2018-11-10 22:03:03 +03:00
|
|
|
require_once PATH_LIB . 'Debug.php';
|
2018-11-06 20:44:45 +03:00
|
|
|
require_once PATH_LIB . 'Exceptions.php';
|
|
|
|
require_once PATH_LIB . 'Format.php';
|
|
|
|
require_once PATH_LIB . 'FormatAbstract.php';
|
|
|
|
require_once PATH_LIB . 'Bridge.php';
|
|
|
|
require_once PATH_LIB . 'BridgeAbstract.php';
|
|
|
|
require_once PATH_LIB . 'FeedExpander.php';
|
|
|
|
require_once PATH_LIB . 'Cache.php';
|
|
|
|
require_once PATH_LIB . 'Authentication.php';
|
|
|
|
require_once PATH_LIB . 'Configuration.php';
|
|
|
|
require_once PATH_LIB . 'BridgeCard.php';
|
|
|
|
require_once PATH_LIB . 'BridgeList.php';
|
|
|
|
require_once PATH_LIB . 'ParameterValidator.php';
|
2018-11-06 20:24:05 +03:00
|
|
|
|
2018-11-06 20:29:00 +03:00
|
|
|
// Functions
|
2018-11-06 20:44:45 +03:00
|
|
|
require_once PATH_LIB . 'html.php';
|
|
|
|
require_once PATH_LIB . 'error.php';
|
|
|
|
require_once PATH_LIB . 'contents.php';
|
2013-08-11 15:30:41 +04:00
|
|
|
|
2018-11-06 20:29:00 +03:00
|
|
|
// Vendor
|
2018-11-06 20:44:45 +03:00
|
|
|
require_once PATH_LIB_VENDOR . 'simplehtmldom/simple_html_dom.php';
|
|
|
|
require_once PATH_LIB_VENDOR . 'php-urljoin/src/urljoin.php';
|
2018-11-10 21:42:49 +03:00
|
|
|
|
|
|
|
// Initialize static members
|
|
|
|
try {
|
2018-11-15 21:07:33 +03:00
|
|
|
Bridge::setWorkingDir(PATH_LIB_BRIDGES);
|
2018-11-15 22:01:56 +03:00
|
|
|
Format::setWorkingDir(PATH_LIB_FORMATS);
|
2018-11-14 22:39:39 +03:00
|
|
|
Cache::setWorkingDir(PATH_LIB_CACHES);
|
2018-11-10 21:42:49 +03:00
|
|
|
} catch(Exception $e) {
|
|
|
|
error_log($e);
|
|
|
|
header('Content-type: text/plain', true, 500);
|
|
|
|
die($e->getMessage());
|
|
|
|
}
|