]> git.mxchange.org Git - friendica.git/blobdiff - mod/noscrape.php
notifications.php - move some template creation to the end of the file
[friendica.git] / mod / noscrape.php
index 1f7105b7690f7d1414f76345726f2dea02211729..2a04605469b845745755b2bce39eb3a5f9472972 100644 (file)
@@ -15,8 +15,12 @@ function noscrape_init(&$a) {
 
        profile_load($a,$which,$profile);
 
-       if(!$a->profile['net-publish'])
-               killme();
+       if (!$a->profile['net-publish'] OR $a->profile['hidewall']) {
+               header('Content-type: application/json; charset=utf-8');
+               $json_info = array("hide" => true);
+               echo json_encode($json_info);
+               exit;
+       }
 
        $keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
        $keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords);
@@ -28,7 +32,7 @@ function noscrape_init(&$a) {
        $json_info = array(
                'fn' => $a->profile['name'],
                'addr' => $a->profile['addr'],
-               'nick' => $a->user['nickname'],
+               'nick' => $which,
                'key' => $a->profile['pubkey'],
                'homepage' => $a->get_baseurl()."/profile/{$which}",
                'comm' => (x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),