X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsearch.php;h=db7279fb5609987846fdf34656cf8328deeb15cf;hb=ee11a74d0b7cff5061a4d498f8ecd15e55b91b07;hp=5aa16716b5e646580aa53a1f6d7d8e9b88c7dd5e;hpb=f7760a9f5b3dc72623281c234b3108d4442d5a78;p=friendica.git
diff --git a/mod/search.php b/mod/search.php
index 5aa16716b5..db7279fb56 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -1,13 +1,25 @@
data['search'] = $_POST['search'];
+}
+
+
function search_content(&$a) {
+ if(x($_SESSION,'theme'))
+ unset($_SESSION['theme']);
+
$o = '
' . "\r\n";
$o .= '' . t('Search') . '
';
- $search = ((x($_GET,'search')) ? $_GET['search'] : '');
+ if(x($a->data,'search'))
+ $search = notags(trim($a->data['search']));
+ else
+ $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
$o .= search($search);
@@ -39,7 +51,7 @@ function search_content(&$a) {
$a->set_pager_total($r[0]['total']);
if(! $r[0]['total']) {
- notice('No results.');
+ notice( t('No results.') . EOL);
return $o;
}
@@ -69,6 +81,7 @@ function search_content(&$a) {
foreach($r as $item) {
+ $total = 0;
$comment = '';
$owner_url = '';
$owner_photo = '';
@@ -79,6 +92,8 @@ function search_content(&$a) {
&& ($item['id'] != $item['parent']))
continue;
+ $total ++;
+
$profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
$profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
@@ -98,6 +113,7 @@ function search_content(&$a) {
$o .= replace_macros($tpl,array(
'$id' => $item['item_id'],
+ '$linktitle' => t('View $name\'s profile'),
'$profile_url' => $profile_link,
'$name' => $profile_name,
'$sparkle' => $sparkle,
@@ -117,6 +133,9 @@ function search_content(&$a) {
}
}
+
+ $o .= paginate($a);
+
return $o;
}