diff --git a/CHANGELOG.md b/CHANGELOG.md index b410dfe88..587664368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Show torrent's announcers list in `filelist.php` page [\#1708](https://github.com/torrentpier/torrentpier/pull/1708) ([belomaxorka](https://github.com/belomaxorka)) - [PHP 8.4] Fixed some deprecations [\#1718](https://github.com/torrentpier/torrentpier/pull/1718) ([belomaxorka](https://github.com/belomaxorka)) - [Configurable] Show magnet-links for guests [\#1712](https://github.com/torrentpier/torrentpier/pull/1712) ([belomaxorka](https://github.com/belomaxorka)) +- Fixed issues with searching by username [\#1722](https://github.com/torrentpier/torrentpier/pull/1722) ([belomaxorka](https://github.com/belomaxorka)) - Fixed searching by username in `memberlist.php` [\#1721](https://github.com/torrentpier/torrentpier/pull/1721) ([belomaxorka](https://github.com/belomaxorka)) - Set `cursor: pointer;` for buttons, inputs (buttons) [\#1710](https://github.com/torrentpier/torrentpier/pull/1710), [\#1711](https://github.com/torrentpier/torrentpier/pull/1711) ([belomaxorka](https://github.com/belomaxorka)) - Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715), [\#1717](https://github.com/torrentpier/torrentpier/pull/1717), [\#1719](https://github.com/torrentpier/torrentpier/pull/1719), [\#1720](https://github.com/torrentpier/torrentpier/pull/1720) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/admin/admin_user_search.php b/admin/admin_user_search.php index 810276e09..d83354ee4 100644 --- a/admin/admin_user_search.php +++ b/admin/admin_user_search.php @@ -252,8 +252,7 @@ if (!isset($_REQUEST['dosearch'])) { $text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username)))); - $username = str_replace("\*", '%', trim(strip_tags(strtolower($username)))); - + $username = str_replace('*', '%', trim(strip_tags(strtolower($username)))); if (str_contains($username, '%')) { $op = 'LIKE'; } else { @@ -273,8 +272,7 @@ if (!isset($_REQUEST['dosearch'])) { $text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email)))); - $email = str_replace("\*", '%', trim(strip_tags(strtolower($email)))); - + $email = str_replace('*', '%', trim(strip_tags(strtolower($email)))); if (str_contains($email, '%')) { $op = 'LIKE'; } else { @@ -568,8 +566,7 @@ if (!isset($_REQUEST['dosearch'])) { $text = strip_tags(htmlspecialchars(stripslashes($userfield_value))); - $userfield_value = str_replace("\*", '%', trim(strip_tags(strtolower($userfield_value)))); - + $userfield_value = str_replace('*', '%', trim(strip_tags(strtolower($userfield_value)))); if (str_contains($userfield_value, '%')) { $op = 'LIKE'; } else { diff --git a/search.php b/search.php index 9dbea3532..7def64ebd 100644 --- a/search.php +++ b/search.php @@ -911,7 +911,7 @@ function username_search($search_match) $username_list = ''; if (!empty($search_match)) { - $username_search = str_replace("\*", '%', clean_username($search_match)); + $username_search = str_replace('*', '%', clean_username($search_match)); $sql = " SELECT username