Merge branch 'lars' into 'master'

Lars

See merge request !152
This commit was merged in pull request #156.
This commit is contained in:
Lars van Hijfte
2017-01-30 15:41:32 +01:00
14 changed files with 303 additions and 117 deletions

View File

@@ -29,6 +29,12 @@ function selectLimitedFriends($userID, $limit) {
`friendship`.`user1ID` = `user`.`userID`) AND
`user`.`role` != 'banned' AND
`friendship`.`status` = 'confirmed'
ORDER BY
CASE
WHEN `friendship`.`user2ID` = `user`.`userID` THEN `friendship`.`chatLastVisted1`
WHEN `friendship`.`user1ID` = `user`.`userID` THEN `friendship`.`chatLastVisted2`
END
DESC
LIMIT :limitCount
");

View File

@@ -15,7 +15,7 @@ function getOldChatMessages($user2ID) {
`origin` = :user2 AND
`destination` = :user1
ORDER BY
`messageID` ASC
`creationdate` ASC
");
$stmt->bindParam(":user1", $user1ID);
@@ -74,7 +74,7 @@ function getNewChatMessages($lastID, $destination) {
`destination` = :user1) AND
`messageID` > :lastID
ORDER BY
`messageID` ASC
`creationdate` ASC
");
$stmt->bindParam(':user1', $_SESSION["userID"]);

View File

@@ -46,6 +46,7 @@ function selectUser($me, $other) {
`bio`,
`user`.`creationdate`,
`onlinestatus`,
`role`,
`fname`,
`lname`,
CASE `status` IS NULL