aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-30 17:06:50 -0700
committerzotlabs <mike@macgirvin.com>2017-05-30 17:53:58 -0700
commita7ecf519156c1110acbb0eadd13dee63b7adaabd (patch)
tree99337977211bc9c1202637bc33e7706b62b3374f
parent14229d0dd3205ea1e85d2c26d6c79bd68d19eda3 (diff)
downloadvolse-hubzilla-a7ecf519156c1110acbb0eadd13dee63b7adaabd.tar.gz
volse-hubzilla-a7ecf519156c1110acbb0eadd13dee63b7adaabd.tar.bz2
volse-hubzilla-a7ecf519156c1110acbb0eadd13dee63b7adaabd.zip
provide ability to search webpages (either public or which contain the observer in the acl) in addition to conversations
-rw-r--r--Zotlabs/Module/Search.php4
-rwxr-xr-xinclude/items.php7
-rw-r--r--include/security.php1
3 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index aacdc88e7..a78a023ff 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -15,7 +15,7 @@ class Search extends \Zotlabs\Web\Controller {
if((get_config('system','block_public')) || (get_config('system','block_public_search'))) {
if ((! local_channel()) && (! remote_channel())) {
notice( t('Public access denied.') . EOL);
- return;
+ return;
}
}
@@ -144,7 +144,7 @@ class Search extends \Zotlabs\Web\Controller {
}
- $item_normal = item_normal();
+ $item_normal = item_normal_search();
$pub_sql = public_permissions_sql($observer_hash);
require_once('include/channel.php');
diff --git a/include/items.php b/include/items.php
index 328079b9d..f7fddad33 100755
--- a/include/items.php
+++ b/include/items.php
@@ -175,6 +175,13 @@ function item_normal() {
and item.item_blocked = 0 ";
}
+function item_normal_search() {
+ return " and item.item_hidden = 0 and item.item_type in (0,3) and item.item_deleted = 0
+ and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
+ and item.item_blocked = 0 ";
+}
+
+
/**
* @brief
*
diff --git a/include/security.php b/include/security.php
index ddbb3d806..6e7b3dbb2 100644
--- a/include/security.php
+++ b/include/security.php
@@ -467,7 +467,6 @@ function scopes_sql($uid,$observer) {
*/
function public_permissions_sql($observer_hash) {
- //$observer = App::get_observer();
$groups = init_groups_visitor($observer_hash);
$gs = '<<>>'; // should be impossible to match