mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Fixed issues with searching by username (#1722)
* Fixed issues with searching by username * Update admin_user_search.php * Update CHANGELOG.md
This commit is contained in:
parent
a6035f0cc1
commit
1914e7be30
3 changed files with 5 additions and 7 deletions
|
@ -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))
|
- 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))
|
- [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))
|
- [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))
|
- 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))
|
- 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))
|
- 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))
|
||||||
|
|
|
@ -252,8 +252,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username))));
|
$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, '%')) {
|
if (str_contains($username, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
} else {
|
} else {
|
||||||
|
@ -273,8 +272,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email))));
|
$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, '%')) {
|
if (str_contains($email, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
} else {
|
} else {
|
||||||
|
@ -568,8 +566,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = strip_tags(htmlspecialchars(stripslashes($userfield_value)));
|
$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, '%')) {
|
if (str_contains($userfield_value, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -911,7 +911,7 @@ function username_search($search_match)
|
||||||
$username_list = '';
|
$username_list = '';
|
||||||
|
|
||||||
if (!empty($search_match)) {
|
if (!empty($search_match)) {
|
||||||
$username_search = str_replace("\*", '%', clean_username($search_match));
|
$username_search = str_replace('*', '%', clean_username($search_match));
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT username
|
SELECT username
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue