aboutsummaryrefslogtreecommitdiffstats
path: root/mod/search.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /mod/search.php
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'mod/search.php')
-rw-r--r--mod/search.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/mod/search.php b/mod/search.php
index 02b250bbe..6d79f5eee 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -14,6 +14,10 @@ function search_content(&$a,$update = 0, $load = false) {
return;
}
}
+
+ if($load)
+ $_SESSION['loadtime'] = datetime_convert();
+
nav_set_selected('search');
require_once("include/bbcode.php");
@@ -53,12 +57,12 @@ function search_content(&$a,$update = 0, $load = false) {
}
if(strpos($search,'@') === 0) {
$search = substr($search,1);
- goaway(z_root() . '/directory' . '?f=1&search=' . $search);
+ goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
// look for a naked webbie
if(strpos($search,'@') !== false) {
- goaway(z_root() . '/directory' . '?f=1&search=' . $search);
+ goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
if(! $search)
@@ -149,24 +153,26 @@ function search_content(&$a,$update = 0, $load = false) {
}
if(local_channel()) {
$r = q("SELECT $prefix mid, item.id as item_id, item.* from item
- WHERE item_restrict = 0
+ WHERE item_restrict = 0 AND ( item_flags & %d ) = 0
AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 )
OR ( `item`.`uid` = %d )) OR item.owner_xchan = '%s' )
$sql_extra
$suffix $pager_sql ",
+ intval(ITEM_OBSCURED),
intval(local_channel()),
dbesc($sys['xchan_hash'])
);
}
if($r === null) {
$r = q("SELECT $prefix mid, item.id as item_id, item.* from item
- WHERE item_restrict = 0
+ WHERE item_restrict = 0 AND ( item_flags & %d ) = 0
AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
AND `item`.`deny_gid` = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
$pub_sql ) OR owner_xchan = '%s')
$sql_extra
$suffix $pager_sql",
+ intval(ITEM_OBSCURED),
dbesc($sys['xchan_hash'])
);
}