]> git.mxchange.org Git - friendica.git/blobdiff - mod/search.php
rolling version number in preparation for release
[friendica.git] / mod / search.php
index e0a8506b68546224b0c222157a20dc852242ec23..33032e183234b706c45b98fbd8ddf1f4104f8d28 100644 (file)
@@ -9,6 +9,15 @@ function search_post(&$a) {
 
 function search_content(&$a) {
 
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               notice( t('Public access denied.') . EOL);
+               return;
+       }
+
+       require_once("include/bbcode.php");
+       require_once('include/security.php');
+       require_once('include/conversation.php');
+
        if(x($_SESSION,'theme'))
                unset($_SESSION['theme']);
 
@@ -26,8 +35,6 @@ function search_content(&$a) {
        if(! $search)
                return $o;
 
-       require_once("include/bbcode.php");
-       require_once('include/security.php');
 
        $sql_extra = "
                AND `item`.`allow_cid` = '' 
@@ -65,7 +72,7 @@ function search_content(&$a) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
-               `contact`.`network`, `contact`.`thumb`, `contact`.`self`, 
+               `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, 
                `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
                `user`.`nickname`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
@@ -81,7 +88,6 @@ function search_content(&$a) {
        );
 
 
-       require_once('include/conversation.php');
 
        $o .= conversation($a,$r,'search',false);