diff --git a/customer_index.php b/customer_index.php index dbe61d99..cea66902 100644 --- a/customer_index.php +++ b/customer_index.php @@ -93,8 +93,6 @@ if ($page == 'overview') { if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI"; $services_enabled = implode(", ", $se); - $news_feed_url = Settings::Get('customer.news_feed_url'); - eval("echo \"" . getTemplate('index/index') . "\";"); } elseif ($page == 'change_password') { if (isset($_POST['send']) && $_POST['send'] == 'send') { diff --git a/lib/ajax.php b/lib/ajax.php index 03df366f..68f4ba6d 100644 --- a/lib/ajax.php +++ b/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); diff --git a/templates/Sparkle/assets/js/main.js b/templates/Sparkle/assets/js/main.js index 2bab8d7d..d74d605f 100644 --- a/templates/Sparkle/assets/js/main.js +++ b/templates/Sparkle/assets/js/main.js @@ -28,11 +28,11 @@ $(document).ready(function() { // Load Newsfeed var ajax_load = "
| News |
|---|