aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirfind.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-09-15 03:21:19 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-09-15 03:21:19 +0200
commit4132d1cd8e59d2cf84d7578ac700c65d7954edd6 (patch)
tree5586bb1bf97ad9e457de2eacb298d28e22c854ee /mod/dirfind.php
parent496f869157ab76139d14a3c67fd8276ee6557517 (diff)
parentaefb0f823353d15a281d3c94ec6fc044e1b62580 (diff)
downloadvolse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.gz
volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.tar.bz2
volse-hubzilla-4132d1cd8e59d2cf84d7578ac700c65d7954edd6.zip
Upstream merge
Diffstat (limited to 'mod/dirfind.php')
-rw-r--r--mod/dirfind.php68
1 files changed, 0 insertions, 68 deletions
diff --git a/mod/dirfind.php b/mod/dirfind.php
deleted file mode 100644
index 54bbf31af..000000000
--- a/mod/dirfind.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-function dirfind_init(&$a) {
-
- require_once('include/contact_widgets.php');
-
- if(! x($a->page,'aside'))
- $a->page['aside'] = '';
-
- $a->page['aside'] .= follow_widget();
-
- $a->page['aside'] .= findpeople_widget();
-}
-
-
-
-function dirfind_content(&$a) {
-
- $search = notags(trim($_REQUEST['search']));
-
- if(strpos($search,'@') === 0)
- $search = substr($search,1);
-
- $o = '';
-
- $o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';
-
- if($search) {
-
- $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
-
- if(strlen(get_config('system','directory_submit_url')))
- $x = fetch_url('http://dir.friendica.com/lsearch?f=' . $p . '&search=' . urlencode($search));
-
-//TODO fallback local search if global dir not available.
-// else
-// $x = post_url($a->get_baseurl() . '/lsearch', $params);
-
- $j = json_decode($x);
-
- if($j->total) {
- $a->set_pager_total($j->total);
- $a->set_pager_itemspage($j->items_page);
- }
-
- if(count($j->results)) {
-
- $tpl = get_markup_template('match.tpl');
- foreach($j->results as $jj) {
-
- $o .= replace_macros($tpl,array(
- '$url' => zid($jj->url),
- '$name' => $jj->name,
- '$photo' => $jj->photo,
- '$tags' => $jj->tags
- ));
- }
- }
- else {
- info( t('No matches') . EOL);
- }
-
- }
-
- $o .= '<div class="clear"></div>';
- $o .= paginate($a);
- return $o;
-}