Improve formatting in mod/display

Co-Authored-By: Philipp <admin+Github@philipp.info>
This commit is contained in:
Hypolite Petovan 2020-01-26 16:59:02 -05:00 committed by GitHub
parent 0736e4e42c
commit fb2f8dcb9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,10 +96,10 @@ function display_init(App $a)
$profiledata = display_fetchauthor($a, $item); $profiledata = display_fetchauthor($a, $item);
if (strstr(Strings::normaliseLink($profiledata["url"]), Strings::normaliseLink(DI::baseUrl()))) { if (strstr(Strings::normaliseLink($profiledata['url']), Strings::normaliseLink(DI::baseUrl()))) {
$nickname = str_replace(Strings::normaliseLink(DI::baseUrl()) . "/profile/", "", Strings::normaliseLink($profiledata["url"])); $nickname = str_replace(Strings::normaliseLink(DI::baseUrl()) . '/profile/', '', Strings::normaliseLink($profiledata['url']));
if (!empty($a->user["nickname"]) && $nickname != $a->user["nickname"]) { if (!empty($a->user['nickname']) && $nickname != $a->user['nickname']) {
$profile = DBA::fetchFirst("SELECT `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` $profile = DBA::fetchFirst("SELECT `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
WHERE `user`.`nickname` = ? AND `profile`.`is-default` AND `contact`.`self` LIMIT 1", WHERE `user`.`nickname` = ? AND `profile`.`is-default` AND `contact`.`self` LIMIT 1",