aboutsummaryrefslogtreecommitdiffstats
path: root/mod/qsearch.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-12-22 20:45:31 +0000
committerThomas Willingham <founder@kakste.com>2013-12-22 20:45:31 +0000
commit3502a2e86b1d4924fea3b0eac6c3ce499eea2f16 (patch)
tree823970af414e5c17ca660fc9cb8d5e6fefa8356d /mod/qsearch.php
parent7ac00d02d110ec2f2d33779d8316e17c13cda149 (diff)
parent7e7b5bfa4930493a8feae10b0550e29797956c70 (diff)
downloadvolse-hubzilla-3502a2e86b1d4924fea3b0eac6c3ce499eea2f16.tar.gz
volse-hubzilla-3502a2e86b1d4924fea3b0eac6c3ce499eea2f16.tar.bz2
volse-hubzilla-3502a2e86b1d4924fea3b0eac6c3ce499eea2f16.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/qsearch.php')
-rw-r--r--mod/qsearch.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/mod/qsearch.php b/mod/qsearch.php
deleted file mode 100644
index c35e253b6..000000000
--- a/mod/qsearch.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-function qsearch_init(&$a) {
-
- if(! local_user())
- killme();
-
- $limit = (get_config('system','qsearch_limit') ? intval(get_config('system','qsearch_limit')) : 100);
-
- $search = ((x($_GET,'s')) ? notags(trim(urldecode($_GET['s']))) : '');
-
- if(! strlen($search))
- killme();
-
-
- if($search)
- $search = dbesc($search);
-
- $results = array();
-
- $r = q("SELECT * FROM `group` WHERE `name` REGEXP '$search' AND `deleted` = 0 AND `uid` = %d LIMIT 0, %d ",
- intval(local_user()),
- intval($limit)
- );
-
- if(count($r)) {
-
- foreach($r as $rr)
- $results[] = array( 0, (int) $rr['id'], $rr['name'], '', '');
- }
-
- $sql_extra = ((strlen($search)) ? " AND (`name` REGEXP '$search' OR `nick` REGEXP '$search') " : "");
-
-
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra ORDER BY `name` ASC LIMIT 0, %d ",
- intval(local_user()),
- intval($limit)
- );
-
-
- if(count($r)) {
-
- foreach($r as $rr)
- $results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']);
- }
-
- echo json_encode((object) $results);
- killme();
-}
-