aboutsummaryrefslogtreecommitdiffstats
path: root/mod/qsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-19 16:33:36 -0800
committerfriendica <info@friendica.com>2013-12-19 16:33:36 -0800
commit7c81889b3397f09dfba4f17bba99f6d1dad9d0b2 (patch)
tree9f8b091fcc204f8bbb5036ffbc1eca82c51f07d3 /mod/qsearch.php
parentf8042cc4677227aca8999c875c4f6d4c7acef96c (diff)
downloadvolse-hubzilla-7c81889b3397f09dfba4f17bba99f6d1dad9d0b2.tar.gz
volse-hubzilla-7c81889b3397f09dfba4f17bba99f6d1dad9d0b2.tar.bz2
volse-hubzilla-7c81889b3397f09dfba4f17bba99f6d1dad9d0b2.zip
make default profile photo configurable - should be functional but needs admin ui
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();
-}
-