mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
'str(i)str(...)' could be replaced with 'str(i)pos(...)'.
(cherry picked from commit b4d079f
)
This commit is contained in:
parent
5dd290f2b2
commit
8e5338e5d3
8 changed files with 14 additions and 14 deletions
|
@ -271,7 +271,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
|
||||
$username = preg_replace('/\*/', '%', trim(strip_tags(strtolower($username))));
|
||||
|
||||
if (strstr($username, '%')) {
|
||||
if (false !== strpos($username, '%')) {
|
||||
$op = 'LIKE';
|
||||
} else {
|
||||
$op = '=';
|
||||
|
@ -292,7 +292,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
|
||||
$email = preg_replace('/\*/', '%', trim(strip_tags(strtolower($email))));
|
||||
|
||||
if (strstr($email, '%')) {
|
||||
if (false !== strpos($email, '%')) {
|
||||
$op = 'LIKE';
|
||||
} else {
|
||||
$op = '=';
|
||||
|
@ -577,7 +577,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
break;
|
||||
case 'equals':
|
||||
// looking for a -
|
||||
if (strstr($postcount_value, '-')) {
|
||||
if (false !== strpos($postcount_value, '-')) {
|
||||
$range = preg_split('/[-\s]+/', $postcount_value);
|
||||
|
||||
$range_begin = (int)$range[0];
|
||||
|
@ -624,7 +624,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
|||
|
||||
$userfield_value = preg_replace('/\*/', '%', trim(strip_tags(strtolower($userfield_value))));
|
||||
|
||||
if (strstr($userfield_value, '%')) {
|
||||
if (false !== strpos($userfield_value, '%')) {
|
||||
$op = 'LIKE';
|
||||
} else {
|
||||
$op = '=';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue