Merge branch 'lars-chat' into 'master'

Fixed name length

See merge request !104
This commit was merged in pull request #108.
This commit is contained in:
Lars van Hijfte
2017-01-24 14:33:11 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ function selectAllFriends($userID) {
SELECT
`userID`,
`username`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`,
IFNULL(
`profilepicture`,
'../img/avatar-standard.png'
@@ -37,7 +37,7 @@ function selectAllFriendRequests() {
SELECT
`userID`,
`username`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`,
IFNULL(
`profilepicture`,
'../img/avatar-standard.png'

View File

@@ -79,12 +79,12 @@ function getNewChatMessages($lastID, $destination) {
function selectAllUnreadChat() {
$stmt = $GLOBALS["db"]->prepare("
SELECT
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`,
IFNULL(
`profilepicture`,
'../img/notbad.jpg'
) AS profilepicture,
LEFT(`private_message`.`content`, 20) as `content`
LEFT(`private_message`.`content`, 15) as `content`
FROM
`private_message`,
`friendship`,