X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-wernis_portal.php;h=126a08492f3553b52684d6c4efc2c686095374ae;hb=1551e5820800685c80c19871a376986c0ad6f0f6;hp=c891089b7ec2e128441152eed6298f4c50aed76d;hpb=3c4fbc22e3c04348734182d4d29bfef7eb050aa6;p=mailer.git
diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php
index c891089b7e..126a08492f 100644
--- a/inc/modules/guest/what-wernis_portal.php
+++ b/inc/modules/guest/what-wernis_portal.php
@@ -1,7 +1,7 @@
");
-$rdf = new fase4_rdf;
+if ((!isExtensionActive('wernis')) && (!isAdmin())) {
+ loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis'));
+ return;
+} // END - if
+
+outputHtml('
');
+$rdf = new fase4_rdf();
+$rdf->_use_nl2br = false;
$rdf->use_dynamic_display(false);
-$rdf->set_CacheDir(PATH."inc/cache/");
-$rdf->set_salt(SITE_KEY);
+$rdf->set_CacheDir(getCachePath() . '');
+$rdf->set_salt(md5(getConfig('SITE_KEY')));
$rdf->set_max_item(10);
$rdf->set_Options(
array(
- 'textinput' => "hidden",
- 'sitelink' => "http://www.wds66.com",
- 'refid' => bigintval($_CONFIG['wernis_refid']),
- 'reflink' => "/ref.php?refid=",
+ 'textinput' => 'hidden',
+ 'sitelink' => 'http://www.wds66.com',
+ 'refid' => getConfig('wernis_refid'),
+ 'reflink' => '/ref.php?refid=',
)
);
// Use proxy?
-if ((!empty($_CONFIG['proxy_host'])) && (!empty($_CONFIG['proxy_port']))) {
+if (isProxyUsed()) {
// Set proxy data
- $rdf->set_proxy($_CONFIG['proxy_host'], $_CONFIG['proxy_port']);
+ $rdf->set_proxy(getConfig('proxy_host'), getConfig('proxy_port'));
// Use auth?
- if (!empty($_CONFIG['proxy_username'])) {
+ if (getConfig('proxy_username') != '') {
// Set auth data
- $rdf->set_proxy_auth($_CONFIG['proxy_username'], $_CONFIG['proxy_password']);
+ $rdf->set_proxy_auth(getConfig('proxy_username'), getConfig('proxy_password'));
} // END - if
} // END - if
-$rdf->parse_RDF("http://www.wds66.com/rss.xml");
-$rdf->finish();
-// DISABLED: $rdf->clear_cache();
-OUTPUT_HTML("
");
+$rdf->parse_RDF('http://www.wds66.com/rss.xml');
+
+// Fix to avoid 'headers already sent' bug. Thanks to Profi-Concept
+outputHtml($rdf->finish(true));
+outputHtml('');
-//
+// [EOF]
?>