]> git.mxchange.org Git - mailer.git/commitdiff
More cached wrapper functions introduced
authorRoland Häder <roland@mxchange.org>
Mon, 5 Jul 2010 08:47:20 +0000 (08:47 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 5 Jul 2010 08:47:20 +0000 (08:47 +0000)
inc/libs/active_functions.php
inc/libs/register_functions.php
inc/modules/admin/what-config_points.php
inc/modules/guest/what-confirm.php
inc/modules/member/what-primera.php
inc/modules/member/what-wernis.php
inc/mysql-manager.php
inc/wrapper-functions.php

index 302480e265ec4b21762fb20b881275d48922a613..97390364d67be3284f1c7e52a79a8743a7c71179 100644 (file)
@@ -48,7 +48,7 @@ function FILTER_ADD_LINK_ACTIVE_LIST () {
        if ((isExtensionActive('active')) && (isExtensionActive('online'))) {
                // Init fake-content because there is no `what`='active' in database
                $content = array(
-                       'menu'    => '<a class="menu_blur" href="{%url=modules.php?module=index&amp;what=active%}">{%config=menu_blur_spacer%}{--GUEST_ACTIVE_LINK--}</a>',
+                       'menu'    => '<a class="menu_blur" href="{%url=modules.php?module=index&amp;what=active%}">{?menu_blur_spacer?}{--GUEST_ACTIVE_LINK--}</a>',
                        'what'    => 'active',
                        'visible' => 'Y',
                        'locked'  => 'N'
index 665a4b7873fdd09c5722ac56952747e918634f61..29a476ac23474b920ab03b8ad41ac464e021201f 100644 (file)
@@ -377,7 +377,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
 
        // Write his welcome-points
        // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
-       addPointsDirectly('register_welcome', $userid, getConfig('points_register'));
+       addPointsDirectly('register_welcome', $userid, getPointsRegister());
 
        // Write catgories
        if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) {
index 43e15afc41f299315c47a5b01121240988ef75f3..4126c7efa9f9a23e0d53f8783d040342288744a0 100644 (file)
@@ -53,14 +53,14 @@ if (isGetRequestParameterSet('sub')) {
        // Yes, then do some sanity-checks
        switch (getRequestParameter('sub')) {
                case 'points':
-                       if ((!isPostRequestParameterSet(('points_register'))) || (!isPostRequestParameterSet(('points_ref')))) {
+                       if ((!isPostRequestParameterSet('points_register')) || (!isPostRequestParameterSet('points_ref'))) {
                                unsetPostRequestParameter('ok');
-                       }
+                       } // END - if
                        break;
 
                case 'ref':
                        if (isGetRequestParameterSet('do')) {
-                               if (((!isPostRequestParameterSet(('level'))) || (!isPostRequestParameterSet(('percents')))) && (getRequestParameter('do') == 'add')) {
+                               if (((!isPostRequestParameterSet('level')) || (!isPostRequestParameterSet('percents'))) && (getRequestParameter('do') == 'add')) {
                                        unsetPostRequestParameter('ok');
                                }
                        }
index 2a75a7d2f0deda15efcac93ca269ed758b67ba48..569f4d4e0a607d94636e3fec610d61b57a4f7345 100644 (file)
@@ -119,7 +119,7 @@ LIMIT 1",
                                        // Add one-time referal bonus over referal system or directly
                                        // @TODO Try to rewrite the following unset()
                                        unset($GLOBALS['ref_level']);
-                                       addPointsThroughReferalSystem('referal_bonus', $refid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
+                                       addPointsThroughReferalSystem('referal_bonus', $refid, getPointsRef(), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
                                } // END - if
                        } // END - if
 
index a683c4777e1cce86eebd276b0c75b7f2ae399a53..f38dfd5b9b099e22308544203a6882ffa39a25db 100644 (file)
@@ -106,7 +106,7 @@ if (getRequestParameter('mode') == 'pay') {
        $points = bigintval($points[0]);
 
        // Remove the registration fee
-       $points = $points - getConfig('points_register');
+       $points = $points - getPointsRegister();
 
        // Is this enougth for a payout?
        if ($points < getConfig('primera_min_payout')) {
index 8cd3a295f5e5dc990327d7a0dffb951480f68b9d..3e3189811f4adae4d2c53dd4daecca2f6f39ce69 100644 (file)
@@ -120,7 +120,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
        $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
 
        // Remove the registration fee
-       $points = $points - getConfig('points_register');
+       $points = $points - getPointsRegister();
 
        // Is there a percentage or fixed fee?
        $points = WERNIS_TAKE_FEE($points, 'payout');
index 105ea2961e1dfe60f2d2343543ce86cb5281c923..571697aabd7266bfe36a17ee8d45b071eb230dad 100644 (file)
@@ -266,7 +266,7 @@ ORDER BY
                                        }
 
                                        // Menu title
-                                       $OUT .= getConfig('menu_blur_spacer') . $content['sub_title'];
+                                       $OUT .= '{?menu_blur_spacer?}' . $content['sub_title'];
 
                                        if (isIncludeReadable($inc)) {
                                                $OUT .= '</a>';
index 748a49a34a14b1ed9f8e8aa380f320ab1e43b1e8..770c266ebafeadc11b491abe1ff4fdddf9c16410 100644 (file)
@@ -1646,6 +1646,18 @@ function getCopy () {
        return $GLOBALS['copy'];
 }
 
+// "Getter" for webmaster
+function getWebmaster () {
+       // Do we have cache?
+       if (!isset($GLOBALS['webmaster'])) {
+               // Determine it
+               $GLOBALS['webmaster'] = getConfig('WEBMASTER');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['webmaster'];
+}
+
 // "Getter" for sql_count
 function getSqlCount () {
        // Do we have cache?
@@ -1682,6 +1694,42 @@ function getDnsCacheTimeout () {
        return $GLOBALS['dns_cache_timeout'];
 }
 
+// "Getter" for menu_blur_spacer
+function getMenuBlurSpacer () {
+       // Do we have cache?
+       if (!isset($GLOBALS['menu_blur_spacer'])) {
+               // Determine it
+               $GLOBALS['menu_blur_spacer'] = getConfig('menu_blur_spacer');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['menu_blur_spacer'];
+}
+
+// "Getter" for points_register
+function getPointsRegister () {
+       // Do we have cache?
+       if (!isset($GLOBALS['points_register'])) {
+               // Determine it
+               $GLOBALS['points_register'] = getConfig('points_register');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['points_register'];
+}
+
+// "Getter" for points_ref
+function getPointsRef () {
+       // Do we have cache?
+       if (!isset($GLOBALS['points_ref'])) {
+               // Determine it
+               $GLOBALS['points_ref'] = getConfig('points_ref');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['points_ref'];
+}
+
 // Checks wether proxy configuration is used
 function isProxyUsed () {
        // Do we have cache?