summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-05-16 17:19:15 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-05-16 17:19:15 -0700
commit329cc1f9b6657ce580b3a297e39a7cd259a62537 (patch)
treedca09b3a78fcdb9a39646f8968312bf0c722b455 /includes
parentc6e4239a672d2456c67e219da480a63f77056723 (diff)
downloadpathery-329cc1f9b6657ce580b3a297e39a7cd259a62537.tar.xz
More PHP warning and notice fixes.
Diffstat (limited to 'includes')
-rw-r--r--includes/datas.php15
1 files changed, 8 insertions, 7 deletions
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 {