Minor improvements (#1411)

* Minor improvements

* Update CHANGELOG.md

* Update edit_user_profile.php

* Updated

* Update main.php

* Update functions.php
This commit is contained in:
Roman Kelesidis 2024-02-27 10:03:01 +03:00 committed by GitHub
commit 635d715247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View file

@ -2177,9 +2177,10 @@ function send_pm($user_id, $subject, $message, $poster_id = BOT_UID)
*
* @param array $data
* @param bool $target_blank
* @param bool $no_link
* @return string
*/
function profile_url(array $data, bool $target_blank = false): string
function profile_url(array $data, bool $target_blank = false, bool $no_link = false): string
{
global $bb_cfg, $lang, $datastore;
@ -2210,13 +2211,13 @@ function profile_url(array $data, bool $target_blank = false): string
}
$profile = '<span title="' . $title . '" class="' . $style . '">' . $username . '</span>';
if (!in_array($user_id, explode(',', EXCLUDED_USERS))) {
if (!in_array($user_id, explode(',', EXCLUDED_USERS)) && !$no_link) {
$target_blank = $target_blank ? ' target="_blank" ' : '';
$profile = '<a ' . $target_blank . ' href="' . make_url(PROFILE_URL . $user_id) . '">' . $profile . '</a>';
}
if (getBanInfo($user_id)) {
return '<s>' . $profile . '</s>';
}
if (getBanInfo($user_id)) {
return '<s>' . $profile . '</s>';
}
return $profile;