Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: warning cleanup * master:
This commit is contained in:
commit
e940acf8c6
|
@ -205,7 +205,6 @@ function hex2bin($s) {
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
if(! ctype_xdigit($s)) {
|
if(! ctype_xdigit($s)) {
|
||||||
logger('hex2bin: illegal input: ' . print_r(debug_backtrace(), true));
|
|
||||||
return($s);
|
return($s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,19 +97,16 @@ function search_content(&$a) {
|
||||||
// OR your own posts if you are a logged in member
|
// OR your own posts if you are a logged in member
|
||||||
// No items will be shown if the member has a blocked profile wall.
|
// No items will be shown if the member has a blocked profile wall.
|
||||||
|
|
||||||
$s_regx = sprintf("AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )",
|
|
||||||
dbesc(preg_quote($search)), dbesc('\\]' . preg_quote($search) . '\\['));
|
|
||||||
|
|
||||||
$search_alg = $s_regx;
|
|
||||||
|
|
||||||
$r = q("SELECT COUNT(*) AS `total`
|
$r = q("SELECT COUNT(*) AS `total`
|
||||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
||||||
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
|
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
|
||||||
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0)
|
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0)
|
||||||
OR `item`.`uid` = %d )
|
OR `item`.`uid` = %d )
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
$search_alg ",
|
AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )",
|
||||||
intval(local_user())
|
intval(local_user()),
|
||||||
|
dbesc(preg_quote($search)),
|
||||||
|
dbesc('\\]' . preg_quote($search) . '\\[')
|
||||||
);
|
);
|
||||||
|
|
||||||
if(count($r))
|
if(count($r))
|
||||||
|
@ -131,9 +128,11 @@ function search_content(&$a) {
|
||||||
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 )
|
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 )
|
||||||
OR `item`.`uid` = %d )
|
OR `item`.`uid` = %d )
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
$search_alg
|
AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )
|
||||||
ORDER BY `received` DESC LIMIT %d , %d ",
|
ORDER BY `received` DESC LIMIT %d , %d ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
|
dbesc(preg_quote($search)),
|
||||||
|
dbesc('\\]' . preg_quote($search) . '\\['),
|
||||||
intval($a->pager['start']),
|
intval($a->pager['start']),
|
||||||
intval($a->pager['itemspage'])
|
intval($a->pager['itemspage'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user