Merge branch 'lars' into 'master'
Lars See merge request !152
This commit was merged in pull request #156.
This commit is contained in:
@@ -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
|
||||
");
|
||||
|
||||
|
||||
@@ -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"]);
|
||||
|
||||
@@ -46,6 +46,7 @@ function selectUser($me, $other) {
|
||||
`bio`,
|
||||
`user`.`creationdate`,
|
||||
`onlinestatus`,
|
||||
`role`,
|
||||
`fname`,
|
||||
`lname`,
|
||||
CASE `status` IS NULL
|
||||
|
||||
Reference in New Issue
Block a user