From: Roland Häder Date: Fri, 19 Dec 2008 17:05:19 +0000 (+0000) Subject: Fix for INSERT INTO query X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2b6a5ae4b90be90e49563bb75d84b727ecf3ecac;p=mailer.git Fix for INSERT INTO query --- diff --git a/inc/databases.php b/inc/databases.php index 36d46f04b4..a15314cc3c 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -115,7 +115,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "667"); +define('CURR_SVN_REVISION', "668"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 21e7f49846..89d3d5e44f 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -132,22 +132,25 @@ function CHECK_MODULE ($mod) { } } - // Check returned values against current access permissions - // - // Admin access ----- Guest access ----- --- Guest or member? --- - if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) { - // If you are admin you are welcome for everything! - $ret = "done"; - } elseif ($locked == "Y") { - // Module is locked - $ret = "locked"; - } elseif (($mem == "Y") && (!IS_MEMBER())) { - // You have to login first! - $ret = "mem_only"; - } elseif (($admin == "Y") && (!IS_ADMIN())) { - // Only the Admin is allowed to enter this module! - $ret = "admin_only"; - } + // Is the module found? + if ($found) { + // Check returned values against current access permissions + // + // Admin access ----- Guest access ----- --- Guest or member? --- + if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) { + // If you are admin you are welcome for everything! + $ret = "done"; + } elseif ($locked == "Y") { + // Module is locked + $ret = "locked"; + } elseif (($mem == "Y") && (!IS_MEMBER())) { + // You have to login first! + $ret = "mem_only"; + } elseif (($admin == "Y") && (!IS_ADMIN())) { + // Only the Admin is allowed to enter this module! + $ret = "admin_only"; + } + } // END - if // Still no luck or not found? if (($ret == "major") || ($ret == "cache_miss") || (!$found)) { @@ -1177,7 +1180,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid // No entry updated? if (SQL_AFFECTEDROWS() < 1) { // First ref in this level! :-) - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,%s,%s)", + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,'%s',%s)", array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")
\n"; } // END - if