]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-wernis_portal.php
Fix for empty refid
[mailer.git] / inc / modules / guest / what-wernis_portal.php
index c747674116abbb1b0f7ed60e54a37751ef1cb25b..fa37e336630a31661b7677892b9da2b82ac0957f 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
+       return;
 }
 
 // Special file
-require_once (PATH."inc/rdf.class.php");
+require_once(PATH."inc/rdf.class.php");
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
 
 OUTPUT_HTML("<DIV style=\"padding-left: 10px; padding-right: 10px\">");
 $rdf = new fase4_rdf;
@@ -53,20 +56,20 @@ $rdf->set_Options(
        array(
                'textinput' => "hidden",
                'sitelink'  => "http://www.wds66.com",
-               'refid'     => bigintval($_CONFIG['wernis_refid']),
+               'refid'     => getConfig('wernis_refid'),
                'reflink'   => "/ref.php?refid=",
        )
 );
 
 // Use proxy?
-if ((!empty($_CONFIG['proxy_host'])) && (!empty($_CONFIG['proxy_port']))) {
+if ((getConfig('proxy_host') != "") && (getConfig('proxy_port') > 0)) {
        // 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