From 329cc1f9b6657ce580b3a297e39a7cd259a62537 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Thu, 16 May 2013 17:19:15 -0700 Subject: More PHP warning and notice fixes. --- includes/datas.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'includes') diff --git a/includes/datas.php b/includes/datas.php index 6bf04d6..2985853 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -509,8 +509,7 @@ function applyAchievements($userID, $aType) { //Is there a next level for this? $aNextLevel = $aLevel + 1; - if (!isset($aArray[$aNextLevel])) - return false; + if (!isset($aArray[$aNextLevel])) return false; list($required, $unlockType, $unlockValue, $unlockName, $unlockSubtype) = $aArray[$aNextLevel]; if ($amount < $required) return false; @@ -800,8 +799,8 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy $row['dateJoined'] = Date("Y-m-d", strtotime($row['dateJoined'])); $row['dateLogin'] = Date("Y-m-d", strtotime($row['dateLogin'])); - $scoredDate = strtotime($row['cdate']); - $secondsSinceScored = strtotime("now") - $scoredDate ; + //$scoredDate = strtotime($row['cdate']); + //$secondsSinceScored = strtotime("now") - $scoredDate ; //Alternate background colors $background = '#262631'; @@ -814,7 +813,7 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy } $output['users'][$i] = $row; - $output['users'][$i]['secondsSinceScored'] = $secondsSinceScored; + //$output['users'][$i]['secondsSinceScored'] = $secondsSinceScored; $output['users'][$i]['background'] = $background; $output['users'][$i]['isUser'] = $userPosition == $i; } // END WHILE @@ -846,7 +845,9 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { $pageReqEnd = $tmp[1]; } - $userID = $_SESSION['userID']; + $userID = 0; + if (isset($_SESSION['userID'])) $userID = $_SESSION['userID']; + $myBestMoves = 0; if ($isBlindMap) { $sql = "SELECT `moves` FROM `solutions` WHERE `mapID` = '$mapID' AND `userID` = '$userID'"; @@ -904,7 +905,7 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { $output['bestBy'] = $row['display']; } - if ($_SESSION['userID'] == $requestedUserID) { + if (isset($_SESSION['userID']) AND $_SESSION['userID'] == $requestedUserID) { $userPosition = $i; //$myBestMoves = $moves; } else { -- cgit v1.2.3