diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-05-10 02:17:14 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-05-10 02:17:14 -0700 |
commit | 86aac4847705f0a4559400da6c0e9f1aeba5cdf8 (patch) | |
tree | c8c43ab196e5a0a4d280ea84152be5d0e061e0c7 /includes/datas.php | |
parent | 51d99728286212717003009dd5706bb74edcb272 (diff) | |
download | pathery-86aac4847705f0a4559400da6c0e9f1aeba5cdf8.tar.xz |
Many bugs and PHP notices & warning fixes.
Diffstat (limited to 'includes/datas.php')
-rw-r--r-- | includes/datas.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/datas.php b/includes/datas.php index 2e48b14..b8ffef7 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -512,8 +512,7 @@ function applyAchievements($userID, $aType) { if (!isset($aArray[$aNextLevel])) return false; list($required, $unlockType, $unlockValue, $unlockName, $unlockSubtype) = $aArray[$aNextLevel]; - if ($amount < $required) - return false; + if ($amount < $required) return false; $sql = "INSERT INTO `achievements` (`userID`, `type`, `level`) @@ -788,12 +787,13 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy $output['updateTime'] = date("g:i A (T)"); $i = $limitTop; + $userPosition = -1; $foundUser = false; while ($row = mysql_fetch_assoc($result)) { $i++; $userID = $row['ID']; - if ($_SESSION['userID'] == $userID) { + if (isset($_SESSION['userID']) AND $_SESSION['userID'] == $userID) { $userPosition = $i; } @@ -889,6 +889,7 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { $output['updateTime'] = time(); $i = 0; + $userPosition = -1; $foundUser = false; while ($row = mysql_fetch_assoc($result)) { @@ -1056,9 +1057,8 @@ function loadChallengeMapCode($mapIdUnsanitized) return NULL; } - function isCurrentMap($mapID) { - include_once('./includes/sqlEmbedded.php'); + include_once('sqlEmbedded.php'); $sql = "SELECT mapID FROM `mapOfTheDay` WHERE `mapID` = '$mapID' |