Fixed a lot typos, thanks to profi-concept
authorRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 19:22:32 +0000 (19:22 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 19:22:32 +0000 (19:22 +0000)
inc/db/lib-mysql3.php
inc/libs/sponsor_functions.php
inc/modules/admin/what-usage.php
inc/mysql-connect.php

index 61d9be17fa1305e720669059823f380a1851389e..8d0ee5f467477c1b0700e9800f285203f611c026 100644 (file)
@@ -322,10 +322,10 @@ function SQL_ESCAPE ($str, $secureString=true,$strip=true) {
 // SELECT query string from table, columns and so on... ;-)
 function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) {
        // Is columns an array?
 // SELECT query string from table, columns and so on... ;-)
 function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) {
        // Is columns an array?
-       if (!is_array($columns) {
+       if (!is_array($columns)) {
                // No array
                trigger_error(sprintf("columns is not array. %s!=array", gettype($columns)));
                // No array
                trigger_error(sprintf("columns is not array. %s!=array", gettype($columns)));
-       }
+       } // END  - if
 
        // Prepare the SQL statement
        $SQL = "SELECT `".implode("`, `", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1";
 
        // Prepare the SQL statement
        $SQL = "SELECT `".implode("`, `", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1";
@@ -361,6 +361,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) {
                        array($tableName, $columnName), $F, $L);
 
                // Do we have no entry on ADD or an entry on DROP?
                        array($tableName, $columnName), $F, $L);
 
                // Do we have no entry on ADD or an entry on DROP?
+               // 123           4       4     3    3     4           4    32    23           4       4     3    3     4            4    321
                if (((SQL_NUMROWS($result) == 0) && (eregi("ADD", $sql) > 0)) || ((SQL_NUMROWS($result) == 1) && (eregi("DROP", $sql) > 0))) {
                        // Do the query
                        $result = SQL_QUERY($sql, $F, $L, false);
                if (((SQL_NUMROWS($result) == 0) && (eregi("ADD", $sql) > 0)) || ((SQL_NUMROWS($result) == 1) && (eregi("DROP", $sql) > 0))) {
                        // Do the query
                        $result = SQL_QUERY($sql, $F, $L, false);
index ec1b82dcb47697eeec1fec666979996dde453eea..024a0c9089a633d24a958dec757942aca3c7a58e 100644 (file)
@@ -144,7 +144,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                        if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
                                // Only allowed for admin
                                $DATA['values'][] = "PENDING";
                        if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
                                // Only allowed for admin
                                $DATA['values'][] = "PENDING";
-                       } elsen{
+                       } else {
                                // Guest area
                                $DATA['values'][] = "UNCONFIRMED";
 
                                // Guest area
                                $DATA['values'][] = "UNCONFIRMED";
 
@@ -163,7 +163,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                        $SQL = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')";
 
                        // Generate message
                        $SQL = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')";
 
                        // Generate message
-                       $MSG = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_ADDED, "added", $MSGs);
+                       $MSG = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $MSGs);
                        $ret = "added";
                } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
                        // Add all data as hidden data
                        $ret = "added";
                } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
                        // Add all data as hidden data
@@ -171,7 +171,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                        foreach ($POST as $k => $v) {
                                // Do not add 'force' !
                                if ($k != "force") {
                        foreach ($POST as $k => $v) {
                                // Do not add 'force' !
                                if ($k != "force") {
-                                       $OUT .= "<INPUT type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\">\n";
+                                       $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
                                }
                        }
                        define('__HIDDEN_DATA', $OUT);
                                }
                        }
                        define('__HIDDEN_DATA', $OUT);
@@ -247,7 +247,7 @@ function SPONSOR_GET_MESSAGE ($msg, $pos, $array) {
 function IS_SPONSOR () {
        // Failed...
        $ret = false;
 function IS_SPONSOR () {
        // Failed...
        $ret = false;
-       if ((isSessionVariableSet('sponsorid'))) && (isSessionVariableSet('sponsorpass')))) {
+       if ((isSessionVariableSet('sponsorid')) && (isSessionVariableSet('sponsorpass'))) {
                // Check cookies against database records...
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE id='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1",
                // Check cookies against database records...
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE id='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1",
index fa5f7747a01e1fbf60ef2a0ffc6ffcfd51fd1167..1e40c5de2feec4f48b81ac44ab970f904cf4b9cf 100644 (file)
@@ -79,7 +79,7 @@ if (!empty($_GET['image'])) {
        );
 }
 
        );
 }
 
-if ((!empty($FQFN)) && (FILE_READABLE($FQFN) {
+if ((!empty($FQFN)) && (FILE_READABLE($FQFN))) {
        // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php
        $tmpl_file = READ_FILE($FQFN);
        $tmpl_file = addslashes($tmpl_file);
        // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php
        $tmpl_file = READ_FILE($FQFN);
        $tmpl_file = addslashes($tmpl_file);
index 966f799f5691ae0f14a0d39c94345a00a6f5ca1a..23fd43926c133639d01bc736ac5a69797251c457 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 define('DEBUG_SQL', false);
 
 // Non-database functions
 define('DEBUG_SQL', false);
 
 // Non-database functions
-LOAD_INC_ONCE("inc/functions.php");
+require("inc/functions.php");
 
 // Filter functions
 LOAD_INC_ONCE("inc/filters.php");  
 
 // Filter functions
 LOAD_INC_ONCE("inc/filters.php");  
@@ -74,7 +74,7 @@ function __errorHandler ($errno, $errstr, $errfile, $errline) {
                mxchange_die("Error message written to debug.log. Please try to call <a href=\"{!URL!}\">the main page</a> to continue.");
        } else {
                // No debug extension found, so regular output
                mxchange_die("Error message written to debug.log. Please try to call <a href=\"{!URL!}\">the main page</a> to continue.");
        } else {
                // No debug extension found, so regular output
-               debug_report_bug();
+               debug_report_bug($msg);
        }
 }
 
        }
 }