aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-12 15:32:15 -0800
committerfriendica <info@friendica.com>2014-11-12 15:32:15 -0800
commitf42a16ca0461b14ba49b15b4de18420860d25330 (patch)
treec60699574b9efee487fd34271366553b1e0962a9
parent4e7567ffa22f04a491821d63c634630d5aacc5b9 (diff)
parent1ed144b83c3cefb685dfff37fd7d415bf5a2ffdb (diff)
downloadvolse-hubzilla-f42a16ca0461b14ba49b15b4de18420860d25330.tar.gz
volse-hubzilla-f42a16ca0461b14ba49b15b4de18420860d25330.tar.bz2
volse-hubzilla-f42a16ca0461b14ba49b15b4de18420860d25330.zip
Merge https://github.com/friendica/red into pending_merge
-rw-r--r--include/contact_widgets.php3
-rw-r--r--mod/directory.php3
-rwxr-xr-xview/tpl/peoplefind.tpl22
3 files changed, 9 insertions, 19 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index 28a9fcfd3..ee9394e95 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -29,8 +29,7 @@ function findpeople_widget() {
'$random' => t('Random Profile'),
'$inv' => t('Invite Friends'),
'$advanced_search' => $advanced_search,
- '$advanced_hint' => t('Exammple: name=fred and country=iceland'),
- '$find_advanced' => t('Advanced Find'),
+ '$advanced_hint' => "\r\n" . t('Advanced example: name=fred and country=iceland'),
'$loggedin' => local_user()
));
diff --git a/mod/directory.php b/mod/directory.php
index 256f7ca9a..d4a4c383a 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -42,7 +42,8 @@ function directory_content(&$a) {
else
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
- $advanced = ((x($_REQUEST,'query')) ? notags(trim($_REQUEST['query'])) : '');
+ if(strpos($search,'=') && local_user() && get_pconfig(local_user(),'feature','expert'))
+ $advanced = $search;
$keywords = (($_GET['keywords']) ? $_GET['keywords'] : '');
diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl
index 6ec37539b..2f23948c8 100755
--- a/view/tpl/peoplefind.tpl
+++ b/view/tpl/peoplefind.tpl
@@ -1,25 +1,15 @@
<div id="peoplefind-sidebar" class="widget">
<h3>{{$findpeople}}</h3>
<form action="directory" method="post" />
- <div class="form-group">
- <div class="input-group">
- <input class="widget-input" type="text" name="search" title="{{$hint}}" placeholder="{{$desc}}" />
- <div class="input-group-btn">
- <button class="btn btn-default btn-sm" type="submit" name="submit"><i class="icon-search"></i></button>
- </div>
- </div>
- </div>
- {{if $advanced_search}}
- <div class="form-group">
- <div id="advanced-people-search-div" class="input-group">
- <input class="widget-input" type="text" name="query" title="{{$advanced_hint}}" placeholder="{{$find_advanced}}" />
+ <div class="form-group">
+ <div class="input-group">
+ <input class="widget-input" type="text" name="search" title="{{$hint}}{{if $advanced_search}}{{$advanced_hint}}{{/if}}" placeholder="{{$desc}}" />
<div class="input-group-btn">
- <button class="btn btn-default btn-sm" type="submit" name="submit"><i class="icon-search"></i></button>
+ <button class="btn btn-default btn-sm" type="submit" name="submit"><i class="icon-search"></i></button>
+ </div>
</div>
</div>
- </div>
- {{/if}}
-</form>
+ </form>
<ul class="nav nav-pills nav-stacked">
{{if $similar}}<li><a href="match" >{{$similar}}</a></li>{{/if}}
{{if $loggedin}}<li><a href="suggest" >{{$suggest}}</a></li>{{/if}}