Typo in function name fixed, double->single quotes, some HTML fixes
authorRoland Häder <roland@mxchange.org>
Tue, 9 Jun 2009 19:41:20 +0000 (19:41 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 9 Jun 2009 19:41:20 +0000 (19:41 +0000)
inc/functions.php
inc/libs/html_mail_functions.php
inc/libs/newsletter_functions.php
inc/libs/surfbar_functions.php
inc/mails/birthday_mails.php
inc/modules/admin/what-usage.php
inc/modules/member/what-order.php
inc/modules/member/what-transfer.php
inc/mysql-connect.php
inc/mysql-manager.php
mailid_top.php

index 66614ab..d16ffb7 100644 (file)
@@ -1216,7 +1216,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') {
 // Deprecated : $length
 // Optional   : $DATA
 //
-function generateRandomCodde ($length, $code, $uid, $DATA = '') {
+function generateRandomCode ($length, $code, $uid, $DATA = '') {
        // Fix missing _MAX constant
        // @TODO Rewrite this unnice code
        if (!defined('_MAX')) define('_MAX', 15235);
index 7071a16..3c4e377 100644 (file)
@@ -55,14 +55,14 @@ function HTML_ADD_VALID_TAGS() {
 //
 function HTML_CHECK_TAGS ($html) {
        $test = stripslashes($html);
-       while (ereg("<", $test) && ereg(">", $test)) {
-               $check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
+       while (ereg('<', $test) && ereg('>', $test)) {
+               $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1));
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                        // Invalid tag found!
                        return "";
                }
-               $test = substr($test, strpos($test, ">") + 1);
+               $test = substr($test, strpos($test, '>') + 1);
        }
        // Return tested code
        return $html;
index 16a28db..f6b0dfd 100644 (file)
@@ -56,14 +56,14 @@ function NL_ADD_VALID_TAGS () {
 //
 function NL_CHECK_TAGS ($html) {
        $test = stripslashes($html);
-       while (ereg("<", $test) && ereg(">", $test)) {
-               $check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
+       while (ereg('<', $test) && ereg('>', $test)) {
+               $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1));
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                        // Invalid tag found!
                        return "";
                }
-               $test = substr($test, strpos($test, ">") + 1);
+               $test = substr($test, strpos($test, '>') + 1);
        }
        // Return tested code
        return $html;
index 3eecd87..3929782 100644 (file)
@@ -969,7 +969,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
                }
 
                // ... and now the validation code
-               $valCode = generateRandomCodde($length, sha1(SURFBAR_GET_SALT().':'.$urlId), getUserId());
+               $valCode = generateRandomCode($length, sha1(SURFBAR_GET_SALT().':'.$urlId), getUserId());
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "valCode={$valCode}", false);
        } // END - while
 
index 609c65a..4cc3ef1 100644 (file)
@@ -84,7 +84,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
 
                        // @TODO 4 is hard-coded here, should we move it out in config?
                        for ($idx = 0; $idx < 4; $idx++) {
-                               $content['check'] .= generateRandomCodde("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1)));
+                               $content['check'] .= generateRandomCode("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1)));
                        }
 
                        // Insert row into database
index c776c2c..70d433e 100644 (file)
@@ -66,7 +66,7 @@ if (REQUEST_ISSET_GET(('image'))) {
 
        if (isFileReadable($FQFN)) {
                $image = imagecreatefrompng($FQFN);
-               sendHeader("Content-type: image/png");
+               sendHeader('Content-type: image/png');
                imagepng($image);
                imagedestroy($image);
        }
@@ -104,10 +104,10 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) {
        $test = strtolower($content);
 
        // Do we need to strip out above and including <body> plus trailing </html> tag?
-       if ((strpos($test, "<body") > 0) && (strpos($test, "</body>") > 0)) {
+       if ((strpos($test, '<body') > 0) && (strpos($test, '</body>') > 0)) {
                // Okay, then do so.
                $content = substr(substr($content, 0, $body_end), $body_start);
-               $content = substr($content, strpos($content, ">") + 1);
+               $content = substr($content, strpos($content, '>') + 1);
        } // END - if
 
        // Output code
index f0dc82a..b080325 100644 (file)
@@ -101,7 +101,7 @@ FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
        array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
 
-       $type = "TEMP"; $id = 0;
+       $type = 'TEMP'; $id = 0;
        if (SQL_NUMROWS($result) == 1) {
                // Load id and mail type
                list($id, $type) = SQL_FETCHROW($result);
@@ -110,7 +110,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
        // Free result
        SQL_FREERESULT($result);
 
-       if ($type == "TEMP") {
+       if ($type == 'TEMP') {
                // No entry found, so we need to check out the stats table as well... :)
                // We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters
                $URL = '';
@@ -145,7 +145,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                if (getConfig('url_blacklist') == 'Y') {
                        // Ok, I do that for you know...
                        $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
-                       array(REQUEST_POST('url')), __FILE__, __LINE__);
+                               array(REQUEST_POST('url')), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result) == 1) {
                                // Jupp, we got one listed
@@ -182,12 +182,12 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                                if (!REQUEST_ISSET_POST(('text'))) $URL = 'modules.php?module=login&amp;what=order&amp;msg=' . getCode('INVALID_TAGS')."&amp;id=".$id;
                        } else {
                                // Remove any HTML code
-                               REQUEST_SET_POST('text', str_replace("<", "{OPEN_HTML}", str_replace(">", "{CLOSE_HTML}", REQUEST_POST('text'))));
+                               REQUEST_SET_POST('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', REQUEST_POST('text'))));
                        }
                }
        } elseif (!IS_ADMIN()) {
                // He has already sent a mail within a specific time
-               $URL = 'modules.php?module=login&amp;what=order&amp;msg=' . getCode('URL_TLOCK')."&amp;id=".$id;
+               $URL = 'modules.php?module=login&amp;what=order&amp;msg=' . getCode('URL_TLOCK') . '&amp;id=' . $id;
        }
 
        // Still no error?
@@ -268,7 +268,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
                        if (($USED > 0) && ($USED <= $total) && ($MAX_SEND > 0)) {
                                // Gettings points is okay, so we can add $USED later from
                                $TIME = time();
-                               if (($id == '0') || ($type != "TEMP")) {
+                               if (($id == '0') || ($type != 'TEMP')) {
                                        // New order
                                        $id = 0;
                                        if (EXT_IS_ACTIVE('html_mail')) {
@@ -553,7 +553,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                                $message = getMessage('MEMBER_ENTER_INVALID_URL');
                                                break;
 
-                                       case "": // When no error code is included in the URL we do not need to output an error message as well...
+                                       case '': // When no error code is included in the URL we do not need to output an error message as well...
                                                break;
 
                                        default:
index 5ce05ad..ff3034a 100644 (file)
@@ -77,7 +77,7 @@ switch ($mode)
                        // Add new transfer
                        if (getConfig('transfer_code') > 0) {
                                // Check for code
-                               $code = generateRandomCodde(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
+                               $code = generateRandomCode(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
                                $valid_code = ($code == REQUEST_POST('code'));
                        } else {
                                // Zero length (= disabled) is always valid!
@@ -171,7 +171,7 @@ switch ($mode)
                                define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age')));
 
                                // Generate tranafer id
-                               define('__TRANS_ID', bigintval(generateRandomCodde("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
+                               define('__TRANS_ID', bigintval(generateRandomCode("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
 
                                // Add entries to both tables
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
@@ -188,16 +188,16 @@ switch ($mode)
                                SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
 
                                // First send email to recipient
-                               $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
-                               sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
+                               $msg = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID'));
+                               sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $msg);
 
                                // Second send email to sender
-                               $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
-                               sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
+                               $msg = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID'));
+                               sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $msg);
 
                                // At last send admin mail(s)
                                $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
-                               sendAdminNotification($ADMIN_SUBJ, "admin_transfer_points");
+                               sendAdminNotification($ADMIN_SUBJ, 'admin_transfer_points');
 
                                // Transfer is completed
                                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&amp;what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
@@ -233,11 +233,11 @@ switch ($mode)
                        if (EXT_IS_ACTIVE('nickname')) {
                                // Load userid and nickname
                                $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
-                        array(getUserId()), __FILE__, __LINE__);
+                                       array(getUserId()), __FILE__, __LINE__);
                        } else {
                                // Load only userid
                                $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
-                        array(getUserId()), __FILE__, __LINE__);
+                                       array(getUserId()), __FILE__, __LINE__);
                        }
 
                        if (SQL_NUMROWS($result) > 0) {
@@ -266,7 +266,7 @@ switch ($mode)
                        } else {
                                // No one else is opt-in
                                $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN');
-                               define('__TRANSFER_TO_DISABLED', " disabled");
+                               define('__TRANSFER_TO_DISABLED', ' disabled="disabled"');
                        }
 
                        // Transfer output to constant for the template
@@ -275,11 +275,11 @@ switch ($mode)
                        // Generate Code
                        if (getConfig('transfer_code') > 0) {
                                $rand = mt_rand(0, 99999);
-                               $code = generateRandomCodde(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
+                               $code = generateRandomCode(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
                                $img = GENERATE_IMAGE($code, false);
                                define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} />&nbsp;".$img);
                        } else {
-                               $code = "00000";
+                               $code = '00000';
                                define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE'));
                        }
 
@@ -295,16 +295,16 @@ switch ($mode)
                        }
 
                        // Output form
-                       LOAD_TEMPLATE("member_transfer_new");
+                       LOAD_TEMPLATE('member_transfer_new');
                }
                break;
 
-       case "list_in": // List only incoming transactions
-       case "list_out": // List only outgoing transactions
+       case 'list_in': // List only incoming transactions
+       case 'list_out': // List only outgoing transactions
                // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
                switch ($mode)
                {
-                       case "list_in":
+                       case 'list_in':
                                $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
                                // @TODO Rewrite these constants
                                $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
@@ -312,7 +312,7 @@ switch ($mode)
                                define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
                                break;
 
-                       case "list_out":
+                       case 'list_out':
                                $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
                                // @TODO Rewrite these constants
                                $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
@@ -329,7 +329,7 @@ switch ($mode)
                        // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries
                        while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
                                // Rewrite points
-                               if ($type == "OUT") $points = $points.'-';
+                               if ($type == 'OUT') $points = $points.'-';
 
                                // Prepare content for template
                                $content = array(
@@ -342,12 +342,12 @@ switch ($mode)
                                );
 
                                // Load row template
-                               $OUT .= LOAD_TEMPLATE("member_transfer_row2", true, $content);
+                               $OUT .= LOAD_TEMPLATE('member_transfer_row2', true, $content);
 
                                // Add points and switch color
                                $total += $points;
                                $SW = 3 - $SW;
-                       }
+                       } // END - while
 
                        // Free memory
                        SQL_FREERESULT($result);
@@ -368,10 +368,10 @@ switch ($mode)
                define('__TRANSFER_TOTAL_VALUE', $total);
 
                // Load final template
-               LOAD_TEMPLATE("member_transfer_list");
+               LOAD_TEMPLATE('member_transfer_list');
                break;
 
-                       case "list_all": // List all transactions
+                       case 'list_all': // List all transactions
                                // We fill a temporary table with data from both tables. This is much easier
                                // to code and unstand by you as sub-SELECT queries. I know this is not the
                                // fastest way but it shall be fine for now.
@@ -391,7 +391,7 @@ KEY(party_uid)
                                $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY `id` LIMIT %s",
                                array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
                                while ($DATA = SQL_FETCHROW($result)) {
-                                       $DATA[] = "IN";
+                                       $DATA[] = 'IN';
                                        $DATA = implode("','", $DATA);
                                        $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
                                }
@@ -403,7 +403,7 @@ KEY(party_uid)
                                $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY `id` LIMIT %s",
                                array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
                                while ($DATA = SQL_FETCHROW($result)) {
-                                       $DATA[] = "OUT";
+                                       $DATA[] = 'OUT';
                                        $DATA = implode("','", $DATA);
                                        $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
                                }
@@ -421,7 +421,7 @@ KEY(party_uid)
                                        $OUT = ''; $SW = 2;
                                        while ($content = SQL_FETCHARRAY($result)) {
                                                // Rewrite points
-                                               if ($content['trans_type'] == "OUT") $content['points'] = '-'.$content['points']."";
+                                               if ($content['trans_type'] == 'OUT') $content['points'] = '-'.$content['points']."";
 
                                                // Prepare content for template
                                                $content['sw']     = $SW;
@@ -434,7 +434,7 @@ KEY(party_uid)
                                                // Add points and switch color
                                                $total += $content['points'];
                                                $SW = 3 - $SW;
-                                       }
+                                       } // END - while
 
                                        // Free memory
                                        SQL_FREERESULT($result);
@@ -461,7 +461,7 @@ KEY(party_uid)
                                define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
 
                                // Load final template
-                               LOAD_TEMPLATE("member_transfer_list");
+                               LOAD_TEMPLATE('member_transfer_list');
 
                                // At the end we don't need a temporary table in memory
                                $result = SQL_QUERY("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__);
@@ -470,7 +470,7 @@ KEY(party_uid)
                                SQL_FREERESULT($result);
                                break;
 
-                       case "": // Overview page
+                       case '': // Overview page
                                // Check incoming transfers
                                $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
                                list($dmy) = SQL_FETCHROW($result);
@@ -512,10 +512,9 @@ KEY(party_uid)
 
                                        // "Settings saved..."
                                        LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
-                               }
+                               } // END - if
 
-                               switch ($opt_in)
-                               {
+                               switch ($opt_in) {
                                        case 'Y':
                                                define('__TRANSFER_ALLOW_Y', ' checked="checked"');
                                                define('__TRANSFER_ALLOW_N', '');
@@ -527,14 +526,15 @@ KEY(party_uid)
                                                define('__TRANSFER_ALLOW_N', ' checked="checked"');
                                                define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
                                                break;
-                               }
+                               } // END - switch
 
                                // Check for latest out-transfers
                                $result = SQL_QUERY_ESC("SELECT time_trans
 FROM `{!_MYSQL_PREFIX!}_user_transfers_out`
 WHERE time_trans > (UNIX_TIMESTAMP() - %s) AND `userid`=%s
 ORDER BY time_trans DESC
-LIMIT 1", array(getConfig('transfer_timeout'), getUserId()), __FILE__, __LINE__);
+LIMIT 1",
+                                       array(getConfig('transfer_timeout'), getUserId()), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 0) {
                                        // Load template
                                        define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE("member_transfer_settings", true));
index 0e0bd80..836da4c 100644 (file)
@@ -158,7 +158,7 @@ if ((!isInstalling()) && (isInstalled())) {
                                // Is the extension sql_patches installed and at least 0.3.6?
                                if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
                                        // Generate random number
-                                       define('RAND_NUMBER', generateRandomCodde(10, mt_rand(10000,32766), getUserId(), ''));
+                                       define('RAND_NUMBER', generateRandomCode(10, mt_rand(10000,32766), getUserId(), ''));
                                } else {
                                        // Generate weak (!!!) code
                                        define('RAND_NUMBER', mt_rand(1000000, 9999999));
index 302e9d2..7504db5 100644 (file)
@@ -627,7 +627,7 @@ function IS_ADMIN ($admin = '') {
                // Check if password is valid
                //* DEBUG: */ print __FUNCTION__."*".$valPass.'/'.$passCookie."*<br />\n";
                $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == "*FAILED*") && (!EXT_IS_ACTIVE('cache'))));
-       }
+       } // END - if
 
        // Return result of comparision
        //* DEBUG: */ if (!$ret) echo __LINE__."OK!<br />";
@@ -670,10 +670,10 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
                define('__MAX_RECEIVE_OPTIONS', $OUT);
 
                // Load template
-               $OUT = LOAD_TEMPLATE($mode."_receive_table", true);
+               $OUT = LOAD_TEMPLATE($mode . '_receive_table', true);
        } else {
                // Maybe the admin has to setup some maximum values?
-               debug_report_bug("Nothing is being done here?");
+               debug_report_bug('Nothing is being done here?');
        }
 
        // Free result
index 5273f72..ed811fd 100644 (file)
@@ -164,7 +164,7 @@ if (isInstalled()) {
                                                        if (($time > 0) && ($payment > 0)) {
                                                                if (!empty($code)) {
                                                                        // Generate code
-                                                                       $img_code = generateRandomCodde(getConfig('code_length'), $code, $url_uid, $urlId);
+                                                                       $img_code = generateRandomCode(getConfig('code_length'), $code, $url_uid, $urlId);
                                                                } // END - if
 
                                                                switch ($mode) {