More references to removed (still some left)
authorRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 17:24:15 +0000 (17:24 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 17:24:15 +0000 (17:24 +0000)
18 files changed:
inc/extensions.php
inc/libs/beg_functions.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/primera_functions.php
inc/libs/rallye_functions.php
inc/libs/register_functions.php
inc/libs/rewrite_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-config_primera.php
inc/modules/admin/what-config_wernis.php
inc/modules/guest/what-register.php

index b3604ccdb48eee5e698bc55ed26fe5dc17a82ff0..90a5af3374eab55fb16506297fa3fc5e4a24bbd4 100644 (file)
@@ -499,9 +499,15 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
 }
 
 // Output verbose SQL table for extension
-function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed = "", $switch = false, $width = "100%") {
+function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = "", $dashed = "", $switch = false, $width = "100%") {
        global $SQLs;
 
+       // Empty title?
+       if (empty($title)) {
+               // Then fix it to default
+               $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REMOVAL');
+       } // END - if
+
        // Are there some queries in $queries?
        if (count($queries) > 0) {
                // Then use them instead!
index 62e5949ba112fae296c342c37dfeeb927e4829aa..31cbc83d2d0fe8622268730e7a564e1632ff12db 100644 (file)
@@ -39,8 +39,6 @@ if (!defined('__SECURITY')) {
 
 // Add points to user or begging rallye account
 function BEG_ADD_POINTS ($uid, $points) {
-       global $_CONFIG;
-
        // Set mode depending on how many mails the member has to confirm
        $locked = false;
        if ((getConfig('ref_payout') > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true;
index b5ea9b2b9f450f85f68751a137908375e4a331e5..f97467bf1bc37c71e0cec5d5fecb1215045ec220 100644 (file)
@@ -38,9 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' !
-function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
-       global $_CONFIG;
-
+function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
        // Shall we add bonus points?
        if (getConfig('bonus_active') != "Y") return false;
 
@@ -112,7 +110,6 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
 }
 //
 function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
-       global $_CONFIG;
        $self = false; $OUT = "";
 
        // How many ranks do we have?
@@ -188,8 +185,6 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 }
 //
 function BONUS_POINTS_HANDLER ($MODE) {
-       global $_CONFIG;
-
        // Shall we add bonus points?
        if (getConfig('bonus_active') != "Y") return;
 
@@ -234,11 +229,9 @@ function BONUS_POINTS_HANDLER ($MODE) {
                break;
        }
 }
-//
-function BONUS_PURGE_EXPIRED_TURBO_BONUS()
-{
-       global $_CONFIG;
 
+//
+function BONUS_PURGE_EXPIRED_TURBO_BONUS() {
        // Remove entries
        $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__);
        if (SQL_AFFECTEDROWS() > 0) {
index be2f18c129327382f249c9cd55a6f0165523c759..4d64435e5106a79037b2d92857e6fe3f478f33bb 100644 (file)
@@ -40,18 +40,17 @@ if (!defined('__SECURITY')) {
 // Generates a HTML table based on given data
 // @TODO Lame description
 function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
-       global $_CONFIG;
        if (empty($cnt)) $cnt = 0;
        $ADD = ""; $DT_MODE = 0;
        if ($uid > 0) {
                // Load entries only from a single user
                $ADD = " AND userid='".bigintval($uid)."'";
                $MODE = "member"; $COLS = "4"; $DT_MODE = "2";
-               $NOT_FOUND = DOUBLER_MEMBER_NO_ENTRIES_FOUND;
+               $NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
        } else {
                // Guest mode!
                $MODE = "guest"; $COLS = "3"; $DT_MODE = "3";
-               $NOT_FOUND = DOUBLER_GUEST_NO_ENTRIES_FOUND;
+               $NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
        }
 
        if (($done == "Y") && ($sort == "ASC")) {
index 58c7f4fff85a942d6e74f586553e6f201d298bc6..34da5e8dd51709bc06a94b6d851b8d754ac34ade 100644 (file)
@@ -243,8 +243,6 @@ function PRIMERA_TEST_API () {
 }
 // Execute the withdraw of a sponsor only!
 function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) {
-       global $_CONFIG;
-
        // Is the sponsor extension installed?
        if (!EXT_IS_ACTIVE("sponsor")) {
                // No, abort here
@@ -258,7 +256,7 @@ function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) {
        $api = new PrimeraApi($primusNick, $userMd5);
 
        // Prepare purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_WITHDRAW, get_session('sponsorid')))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), get_session('sponsorid')))."\";";
        eval($eval);
 
        // Pay the Primera
@@ -266,13 +264,11 @@ function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) {
 }
 // Execute the payout
 function PRIMERA_EXECUTE_PAYOUT ($primusNick, $userMd5, $amount) {
-       global $_CONFIG;
-
        // Get new instance
        $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5'));
 
        // Prepare purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), $GLOBALS['userid']))."\";";
        eval($eval);
 
        // Pay the Primera
index 3304a5f7242b5bef5973438f4ef55d949f633c77..d156ee865bee77833e16ed2f135db978e51f1b27 100644 (file)
@@ -514,8 +514,6 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye)
 
 //
 function RALLYE_LOAD_USERS_ARRAY ($rallye) {
-       global $_CONFIG;
-
        // Fix zero points to 0.00000
        if (getConfig('ref_payout') == "0") setConfigEntry('ref_payout', "0.00000");
 
index 042ed73134df4c3254d764034aef68745b2d7ad2..1d36cd12a4ef0a28ea38fe35c27e3369fb50b7f8 100644 (file)
@@ -102,9 +102,7 @@ function REGISTER_OUTPUT_REQUIRE_CHECK(&$array)
        SQL_FREERESULT($result);
 }
 //
-function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
-{
-       global $_POST, $_CONFIG;
+function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
        $OUT = "";
 
        // Guests are mostly not interested in how many members has
@@ -114,13 +112,11 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
        // Admins are allowed to see every category...
        if (IS_ADMIN()) $AND = "";
        $result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // List alle visible modules (or all to the admin)
                $SW = 2;
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
-               while (list($id, $cat, $visible) = SQL_FETCHROW($result))
-               {
+               while (list($id, $cat, $visible) = SQL_FETCHROW($result)) {
                        if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = "";
                        // Prepare array for the template
                        $content = array(
@@ -145,20 +141,15 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
 
                // Free memory
                SQL_FREERESULT($result);
-       }
-        else
-       {
+       } else {
                // No categories setted up so far...
-               $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, NO_CATEGORIES_VISIBLE);
+               $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_CATEGORIES_VISIBLE'));
        }
 
-       if ($return)
-       {
+       if ($return) {
                // Return generated HTML code
                return $OUT;
-       }
-        else
-       {
+       } else {
                // Output directly (default)
                OUTPUT_HTML($OUT);
        }
index 8a8d6f01fcf023e3c41b33677df8a7fd4b211bf1..e7fa920e68c4d433f8919b0cb8a50ec4f1993fc4 100644 (file)
@@ -39,8 +39,6 @@ if (!defined('__SECURITY')) {
 
 //
 function REWRITE_LINKS ($HTML) {
-       global $_CONFIG;
-
        // Skip rewriting for the admin area (which search engine may enter here???)
        if (ereg($GLOBALS['module'], getConfig('rewrite_skip'))) return $HTML;
 
index 868ff4386286fa8e384b113105375158043706a7..5ef940265a065abbe5fdcd415fe9bf860e9f76f6 100644 (file)
@@ -352,7 +352,6 @@ ORDER BY `sort`", array($action), __FILE__, __LINE__);
 //
 function GENERATE_SPONSOR_CONTENT($what)
 {
-       global $_CONFIG;
        $OUT = "";
        $INC = sprintf("inc/modules/sponsor/%s.php", $what);
        if (FILE_READABLE($INC)) {
@@ -456,16 +455,14 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        switch ($GLOBALS['what'])
        {
        case "account": // Change account data
-               if ($EMAIL) {
-                       $MSG   = SPONSOR_ACCOUNT_EMAIL_CHANGED;
+               if ($EMAIL === true) {
+                       $MSG   = getMessage('SPONSOR_ACCOUNT_EMAIL_CHANGED');
                        $templ = "admin_sponsor_change_email";
-                       $subj  = ADMIN_SPONSOR_ACC_EMAIL_SUBJ;
-               }
-                else
-               {
-                       $MSG   = SPONSOR_ACCOUNT_DATA_SAVED;
+                       $subj  = getMessage('ADMIN_SPONSOR_ACC_EMAIL_SUBJ');
+               } else {
+                       $MSG   = getMessage('SPONSOR_ACCOUNT_DATA_SAVED');
                        $templ = "admin_sponsor_change_data";
-                       $subj  = ADMIN_SPONSOR_ACC_DATA_SUBJ;
+                       $subj  = getMessage('ADMIN_SPONSOR_ACC_DATA_SUBJ');
                }
                break;
 
@@ -475,9 +472,9 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                $content['interval'] = CREATE_FANCY_TIME($content['warning_interval']);
 
                // Set message template and subject for admin
-               $MSG   = SPONSOR_SETTINGS_SAVED;
+               $MSG   = getMessage('SPONSOR_SETTINGS_SAVED');
                $templ = "admin_sponsor_settings";
-               $subj  = ADMIN_SPONSOR_SETTINGS_SUBJ;
+               $subj  = getMessage('ADMIN_SPONSOR_SETTINGS_SUBJ');
                break;
 
        default: // Unknown sponsor what value!
@@ -487,10 +484,8 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                break;
        }
 
-       if (SQL_AFFECTEDROWS() == 1)
-       {
-               if (!empty($templ) && !empty($subj))
-               {
+       if (SQL_AFFECTEDROWS() == 1) {
+               if (!empty($templ) && !empty($subj)) {
                        // Run SQL command and check for success
                        $result = SQL_QUERY_ESC($SQL, $DATA, __FILE__, __LINE__);
 
@@ -508,8 +503,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                        SEND_ADMIN_NOTIFICATION($subj, $templ, $content);
 
                        // Shall we send mail to the sponsor's new email address?
-                       if ($content['receive_warnings'] == "Y")
-                       {
+                       if ($content['receive_warnings'] == "Y") {
                                // Okay send email with confirmation link to new address and with no confirmation link
                                // to the old address
 
@@ -518,23 +512,22 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                                {
                                case "account": // Change account data
                                        $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
-                                       SEND_EMAIL($content['email'], SPONSOR_ACC_DATA_SUBJ, $email_msg);
+                                       SEND_EMAIL($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
 
-                                       if ($EMAIL)
-                                       {
+                                       if ($EMAIL === true) {
                                                // Add hash code to content array
                                                $content['hash'] = $HASH;
 
                                                // Second mail goes to the new address
                                                $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content);
-                                               SEND_EMAIL($content['email'], SPONSOR_ACC_EMAIL_SUBJ, $email_msg);
+                                               SEND_EMAIL($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
                                        }
                                        break;
 
                                case "settings": // Change settings
                                        // Send email
                                        $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content);
-                                       SEND_EMAIL($content['email'], SPONSOR_SETTINGS_SUBJ, $email_msg);
+                                       SEND_EMAIL($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
                                        break;
                                }
                        }
@@ -544,5 +537,6 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        // Return final message
        return $MSG;
 }
+
 //
 ?>
index 87b924d5dce809a40bcdbdde20a159b795563f81..f97cab7c4bd97c8e9d176b1c1d6e230e6ecd70b0 100644 (file)
@@ -146,8 +146,6 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) {
 //
 // Member has added an URL
 function SURFBAR_MEMBER_ADD_URL ($url, $limit) {
-       global $_CONFIG;
-
        // Do some pre-checks
        if (!IS_MEMBER()) {
                // Not a member
@@ -474,10 +472,9 @@ function SURFBAR_HANDLE_DEPLETED_VIEWS () {
                } // END - foreach
        } // END - if
 }
+
 // Alert users which have URLs booked and are low on points amount
 function SURFBAR_HANDLE_LOW_POINTS () {
-       global $_CONFIG;
-
        // Get all userids
        $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(getConfig('surfbar_warn_low_points'));
 
@@ -503,11 +500,13 @@ function SURFBAR_HANDLE_LOW_POINTS () {
                } // END - if
        } // END - foreach
 }
+
 //
 // -----------------------------------------------------------------------------
 //                               Generic functions
 // -----------------------------------------------------------------------------
 //
+
 // Looks up by an URL
 function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
        // Now lookup that given URL by itself
@@ -516,6 +515,7 @@ function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
        // Was it found?
        return (count($urlArray) > 0);
 }
+
 // Load URL data by given search term and column
 function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add="") {
        global $lastUrlData;
@@ -564,10 +564,9 @@ ORDER BY %s %s
        // Return the result
        return $lastUrlData;
 }
+
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
 function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $extraFields = array()) {
-       global $_CONFIG;
-
        // Make sure by the user registered URLs are always pending
        if ($addMode == "reg") $status = "PENDING";
 
@@ -607,6 +606,7 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e
        // Return the insert id
        return $content['insert_id'];
 }
+
 // Inserts an url by given data array and return the insert id
 function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
        // Get userid
@@ -630,25 +630,22 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
        // Return insert id
        return SQL_INSERTID();
 }
+
 // Notify admin(s) with a selected message and content
 function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
        // Prepare template name
        $templateName = sprintf("admin_surfbar_%s", $messageType);
 
-       // Set default subject if following eval() wents wrong
-       $subject = ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
-
-       // Create constant name
-       $constantName = sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
+       // Prepare subject
+       $subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
                strtoupper($messageType)
-       );
+       ));
 
-       // Prepare subject
-       if (defined($constantName)) {
-               $subject = constant($constantName);
-       } else {
-               addFatalMessage(getMessage('ADMIN_SURFBAR_NOTIFY_SUBJECT_404'), $constantName);
-       }
+       // Is the subject line there?
+       if ((substr($subject, 0, 1) == "!") && (substr($subject, -1, 1) == "!")) {
+               // Set default subject if following eval() wents wrong
+               $subject = getMessage('ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT');
+       } // END - if
 
        // Translate some data if present
        if (isset($content['status']))        $content['status']        = SURFBAR_TRANSLATE_STATUS($content['status']);
@@ -661,6 +658,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
        // Send the notification out
        return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
 }
+
 // Notify the user about the performed action
 function SURFBAR_NOTIFY_USER ($messageType, $content) {
        // Skip notification if userid is zero
@@ -671,20 +669,16 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
        // Prepare template name
        $templateName = sprintf("member_surfbar_%s", $messageType);
 
-       // Set default subject if following eval() wents wrong
-       $subject = MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
-
-       // Create constant name
-       $constantName = sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
+       // Prepare subject
+       $subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
                strtoupper($messageType)
-       );
+       ));
 
-       // Prepare subject
-       if (defined($constantName)) {
-               $subject = constant($constantName);
-       } else {
-               addFatalMessage(getMessage('MEMBER_SURFBAR_NOTIFY_SUBJECT_404'), $constantName);
-       }
+       // Is the subject line there?
+       if ((substr($subject, 0, 1) == "!") && (substr($subject, -1, 1) == "!")) {
+               // Set default subject if following eval() wents wrong
+               $subject = getMessage('MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT');
+       } // END - if
 
        // Translate some data if present
        if (isset($content['status']))        $content['status']        = SURFBAR_TRANSLATE_STATUS($content['status']);
@@ -733,8 +727,6 @@ function SURFBAR_TRANSLATE_STATUS ($status) {
 }
 // Determine reward
 function SURFBAR_DETERMINE_REWARD ($onlyMin=false) {
-       global $_CONFIG;
-
        // Static values are default
        $reward = getConfig('surfbar_static_reward');
 
@@ -753,8 +745,6 @@ function SURFBAR_DETERMINE_REWARD ($onlyMin=false) {
 }
 // Determine costs
 function SURFBAR_DETERMINE_COSTS ($onlyMin=false) {
-       global $_CONFIG;
-
        // Static costs is default
        $costs  = getConfig('surfbar_static_costs');
 
@@ -799,7 +789,7 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() {
 // Check if the "reload lock" of the current user is full, call this function
 // before you call SURFBAR_CHECK_RELOAD_LOCK().
 function SURFBAR_CHECK_RELOAD_FULL() {
-       global $SURFBAR_CACHE, $_CONFIG;
+       global $SURFBAR_CACHE;
 
        // Default is full!
        $isFull = true;
@@ -874,15 +864,11 @@ WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND `status`='%s'",
 }
 // Check wether the user is allowed to book more URLs
 function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) {
-       global $_CONFIG;
-
        // Is this admin and userid is zero or does the user has some URLs left to book?
        return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, "", array("REJECTED")) < getConfig('surfbar_max_order')));
 }
 // Get total amount of URLs of given status for current user
 function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") {
-       global $_CONFIG;
-
        // Is the user 0 and user is logged in?
        if (($uid == 0) && (IS_MEMBER())) {
                // Then use this userid
@@ -929,7 +915,7 @@ LIMIT %s",
 }
 // Generate a validation code for the given id number
 function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt="") {
-       global $_CONFIG, $SURFBAR_CACHE;
+       global $SURFBAR_CACHE;
 
        // @TODO Invalid salt should be refused
        $SURFBAR_CACHE['salt'] = "INVALID";
@@ -998,8 +984,6 @@ function SURFBAR_LOCKDOWN_ID ($urlId) {
 }
 // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf"
 function SURFBAR_PAY_POINTS () {
-       global $_CONFIG;
-
        // Remove it from the URL owner
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS()."", false);
        if (SURFBAR_GET_USERID() > 0) {
@@ -1012,8 +996,6 @@ function SURFBAR_PAY_POINTS () {
 }
 // Updates the statistics of current URL/userid
 function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
-       global $_CONFIG;
-
        // Init add
        $ADD = "";
 
@@ -1160,8 +1142,6 @@ ORDER BY u.userid ASC", __FILE__, __LINE__);
 }
 // Determine how many users are Online in surfbar
 function SURFBAR_DETERMINE_TOTAL_ONLINE () {
-       global $_CONFIG;
-
        // Count all users in surfbar modue and return the value
        $result = SQL_QUERY_ESC("SELECT id
 FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
@@ -1203,8 +1183,6 @@ function SURFBAR_DETERMINE_WAIT_TIME () {
 }
 // Changes the status of an URL from given to other
 function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) {
-       global $_CONFIG;
-
        // Make new status always lower-case
        $newStatus = strtolower($newStatus);
 
@@ -1262,8 +1240,6 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array())
 }
 // Calculate minimum value for dynamic payment model
 function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
-       global $_CONFIG;
-
        // Addon is zero by default
        $addon = 0;
 
@@ -1297,8 +1273,6 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
 }
 // Calculate maximum value for dynamic payment model
 function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
-       global $_CONFIG;
-
        // Addon is zero by default
        $addon = 0;
 
@@ -1325,8 +1299,6 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
 }
 // Calculate dynamic lock
 function SURFBAR_CALCULATE_DYNAMIC_LOCK () {
-       global $_CONFIG;
-
        // Default lock is 30 seconds
        $addon = 30;
 
@@ -1394,7 +1366,6 @@ ORDER BY
 }
 // "Getter" for maximum random number
 function SURFBAR_GET_MAX_RANDOM ($UIDs, $ADD) {
-       global $_CONFIG;
        // Count max availabe entries
        $result = SQL_QUERY("SELECT sbu.id AS cnt
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls` AS sbu
@@ -1482,7 +1453,7 @@ function SURFBAR_RELOAD_TO_STOP_PAGE($page="stop") {
 // Determine next id for surfbar or get data for given id, always call this before you call other
 // getters below this function!!!
 function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) {
-       global $SURFBAR_CACHE, $_CONFIG;
+       global $SURFBAR_CACHE;
 
        // Default is no id and no random number
        $nextId = 0;
index 4f79540237bd5b964571092111ebaea516f3a14b..dd7e3249de297c851e1bfbcacb61a760ac77533e 100644 (file)
@@ -47,8 +47,6 @@ if (!defined('__SECURITY')) {
 //
 // @TODO Move all extension-dependent queries into filters
 function OUTPUT_ADVANCED_OVERVIEW (&$result_main) {
-       global $_CONFIG;
-
        // Init variables/arrays
        $EXTRAS = "";
        $OUT = "";
index 61740102422297cb03c750b3b3d8acd966ca0912..7c747ddf57a96cf896d6fd92480c9759bd80490c 100644 (file)
@@ -39,7 +39,6 @@ if (!defined('__SECURITY')) {
 
 // Add links for selecting some users
 function alpha ($sortby, $colspan, $return=false) {
-       global $_CONFIG;
        if (empty($_GET['offset'])) $_GET['offset'] = 0;
        $ADD = "&amp;page=".SQL_ESCAPE($_GET['page'])."&amp;offset=".SQL_ESCAPE($_GET['offset']);
        if (!empty($_GET['mode'])) $ADD .= "&amp;mode=".SQL_ESCAPE($_GET['mode']);
@@ -219,8 +218,6 @@ WHERE email='%s'".$locked." LIMIT 1",
 
 // Selects a random user id as the new referal id if they have at least X confirmed mails in this run
 function SELECT_RANDOM_REFID () {
-       global $_CONFIG;
-
        // Default is zero refid
        $refid = 0;
 
index e8e6d9a59b95e25bfad0689e35e955e35a237d89..89adec715d09d743c95ba49ba2e06bb75876a27f 100644 (file)
@@ -261,13 +261,11 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
 
 // Payout this amount
 function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) {
-       global $_CONFIG;
-
        // Default is failed attempt
        $result = false;
 
        // Prepare the purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), $GLOBALS['userid']))."\";";
        eval($eval);
 
        // Prepare the request data
index 2850f95bfad52f1d462ef660ba344c33cf9e224c..4d11ed13fe65819b2ce304461a28c9b83fd5f624 100644 (file)
@@ -632,7 +632,7 @@ function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") {
 
 // Save settings to the database
 function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="config=0", $translateComma=array(), $alwaysAdd=false) {
-       global $_CONFIG, $cacheArray, $cacheInstance;
+       global $cacheArray, $cacheInstance;
 
        // Prepare all arrays, variables
        $DATA = array();
@@ -667,7 +667,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
                                }
 
                                // Update current configuration
-                               $_CONFIG[$id] = $val;
+                               setConfigEntry($id, $val);
                        } // END - if
                } // END - if
        } // END - foreach
index f2f05f97b0bfc4a4b47ae8d874758042f691a4f0..2ffdeee1f7d3c2b72692c2cd84957ede3b35d330 100644 (file)
@@ -38,7 +38,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 }
 
 function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
-       global $cacheArray, $_CONFIG;
+       global $cacheArray;
 
        // First check for solved and not assigned tasks and assign them to current admin
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
@@ -119,7 +119,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC",
 
 // Outputs selected tasks
 function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) {
-       global $_CONFIG, $NOTES;
+       global $NOTES;
        if ((isset($POST['assign'])) && (count($POST['task']) > 0)) {
                // Assign / do tasks
                $OUT = ""; $SW = 2;
index 69afcbf6cd6b2fd3a7fbe9166b81be11dfeeb8b9..3a8d0da5c2885b3610d1600b3000c09830369d4e 100644 (file)
@@ -42,6 +42,7 @@ ADD_DESCR("admin", __FILE__);
 
 if (isset($_POST['ok'])) {
        // First merge temporarily the new API data into the current config
+       global $_CONFIG;
        $_CONFIG = merge_array($_CONFIG, $_POST);
 
        // Is the password set?
index 3e79f811a4b9d1cbb080b55364e9abbc4a48b4b7..cfa9132c55b6c6f2cb16a2fd33c4035f48eeff51 100644 (file)
@@ -42,6 +42,7 @@ ADD_DESCR("admin", __FILE__);
 
 if (isset($_POST['ok'])) {
        // First merge temporarily the new API data into the current config
+       global $_CONFIG;
        $_CONFIG = merge_array($_CONFIG, $_POST);
 
        // Let's test the API first (hold your horses here, cowboy! Thank you. :) )
index ef95af5fecb17545d65441ac9b269188772bc76a..422fbf778726b68e83569b4d65fc56a59f78bb9e 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 // Add description as navigation point
 ADD_DESCR("guest", __FILE__);
 
-global $_CONFIG, $DATA;
+global $DATA;
 
 // Initialize variables
 $FAILED = false; $SHORT_PASS = false; $cats = 0; $IP_TIMEOUT = false;