A lot more wrapper functions added, templates renamed
[mailer.git] / inc / modules / member / what-wernis.php
index e1a650438320fb12bd52119e5b82a7c2d5dd79e9..f8c43992b52068b79128c9b95464b82984b889fd 100644 (file)
@@ -52,7 +52,7 @@ if ((!isExtensionActive('wernis')) && (!isAdmin())) {
 } // END - if
 
 // Check if the admin has entered the data
-if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) {
+if ((getWernisApiId() == '') || (getWernisApiMd5() == '')) {
        // Something important is missing...
        loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_API_DATA_MISSING--}');
        return;
@@ -104,7 +104,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
                } // END - if
 
                // Is the withdraw mode active?
-               if (getConfig('wernis_withdraw_active') == 'Y') {
+               if (isWernisWithdrawActive()) {
                        // Add link
                        $content['withdraw_link'] = '<a class="menu_blur" style="height: 40px" href="{%url=modules.php?module=login&amp;what=wernis&amp;mode=withdraw%}"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>';
                } // END - if
@@ -132,7 +132,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
 
        // Add points to content array
        $content['points']     = $points;
-} elseif ((getRequestParameter('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
+} elseif ((getRequestParameter('mode') == 'withdraw') && (isWernisWithdrawActive())) {
        // Prepare data for the template
        $content['points']        = getTotalPoints(getMemberId());
        $content['wernis_userid'] = '';