]> 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 0cb400b6cb811a77283f7b769ca4f21cdc300ead..fa37e336630a31661b7677892b9da2b82ac0957f 100644 (file)
@@ -35,7 +35,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif (!EXT_IS_ACTIVE("wernis")) {
+} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
        return;
 }
@@ -56,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