X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fjackpot_functions.php;h=94a6fc2316d5716f73745f8ea7bb7a83f076d446;hp=b2e567049fd2773aeee6f26298f9b954f5c83329;hb=20741b93fd58620af677a7f1039ffd16ea6ec689;hpb=c85ddc06cc16f2cd38ddd7d4c142a3f578bbab69 diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index b2e567049f..94a6fc2316 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -14,12 +14,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -54,7 +52,7 @@ function getJackpotPoints () { // Do we have an entry? if (SQL_HASZERONUMS($result)) { // No, so create line - SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); + SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`,`points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); } else { // Read the line $data = SQL_FETCHARRAY($result); @@ -80,7 +78,7 @@ function addPointsToJackpot ($points) { // Subtracts points from the jackpot function subtractPointsFromJackpot ($points) { // First failed - $ret = '-1'; + $ret = false; // Get jackpot points for dummy $jackpot = getJackpotPoints(); @@ -90,7 +88,7 @@ function subtractPointsFromJackpot ($points) { // Update points when there are enougth points in jackpot SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_jackpot` SET `points`=`points`-%s WHERE `ok`='ok' LIMIT 1", array($points), __FUNCTION__, __LINE__); - $ret = $jackpot - $points; + $ret = (!SQL_HASZEROAFFECTED()); } // END - if // Free memory