Read the custom RSS directly from the settings
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
17
lib/ajax.php
17
lib/ajax.php
@@ -16,6 +16,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Load the user settings
|
||||
define('FROXLOR_INSTALL_DIR', dirname(dirname(__FILE__)));
|
||||
if (!file_exists('./userdata.inc.php')) {
|
||||
die();
|
||||
}
|
||||
require './userdata.inc.php';
|
||||
require './tables.inc.php';
|
||||
require './classes/database/class.Database.php';
|
||||
require './classes/settings/class.Settings.php';
|
||||
|
||||
if(isset($_POST['action'])) {
|
||||
$action = $_POST['action'];
|
||||
} elseif(isset($_GET['action'])) {
|
||||
@@ -25,8 +35,8 @@ if(isset($_POST['action'])) {
|
||||
}
|
||||
|
||||
if ($action == "newsfeed") {
|
||||
if (isset($_GET['url'])) {
|
||||
$feed = $_GET['url'];
|
||||
if (isset($_GET['role']) && $_GET['role'] == "customer") {
|
||||
$feed = Settings::Get("customer.news_feed_url");
|
||||
} else {
|
||||
$feed = "http://inside.froxlor.org/news/";
|
||||
}
|
||||
@@ -35,9 +45,6 @@ if ($action == "newsfeed") {
|
||||
die();
|
||||
}
|
||||
|
||||
// get version
|
||||
require './tables.inc.php';
|
||||
|
||||
if (function_exists('curl_version')) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $feed);
|
||||
|
||||
Reference in New Issue
Block a user