Merge branch 'rewrites/dbm_is_result' of github.com:Quix0r/friendica into rewrites/dbm_is_result
Signed-off-by: Roland Häder <roland@mxchange.org> Conflicts: include/Photo.php include/api.php include/cache.php include/dbstructure.php include/enotify.php include/items.php include/onepoll.php include/queue_fn.php include/session.php include/text.php mod/contacts.php mod/dfrn_request.php mod/display.php mod/events.php mod/item.php mod/message.php mod/msearch.php mod/photos.php mod/poco.php mod/profile.php mod/proxy.php mod/videos.php update.php view/theme/diabook/theme.php view/theme/vier/theme.php
This commit is contained in:
commit
63610c7b73
33 changed files with 320 additions and 260 deletions
|
@ -13,9 +13,12 @@ function msearch_post(&$a) {
|
|||
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') ",
|
||||
dbesc($search)
|
||||
);
|
||||
|
||||
if(dbm::is_result($r))
|
||||
$total = $r[0]['total'];
|
||||
|
||||
$results = array();
|
||||
|
||||
$r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ",
|
||||
dbesc($search),
|
||||
intval($startrec),
|
||||
|
@ -23,6 +26,7 @@ function msearch_post(&$a) {
|
|||
);
|
||||
|
||||
$results = array();
|
||||
|
||||
if(dbm::is_result($r)) {
|
||||
foreach($r as $rr)
|
||||
$results[] = array(
|
||||
|
@ -39,4 +43,4 @@ function msearch_post(&$a) {
|
|||
|
||||
killme();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue