'str(i)str(...)' could be replaced with 'str(i)pos(...)'.

(cherry picked from commit b4d079f)
This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:01:48 +03:00 committed by Vasily Komrakov
commit 8e5338e5d3
No known key found for this signature in database
GPG key ID: 558236680C20A69A
8 changed files with 14 additions and 14 deletions

View file

@ -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 = '=';