summaryrefslogtreecommitdiffstats
path: root/includes/datas.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/datas.php')
-rw-r--r--includes/datas.php10
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'