From: Michael Date: Tue, 10 Sep 2019 17:15:29 +0000 (+0000) Subject: Issue 7610: Set the appropriate meta header to not being crawled X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=57e4b9f80683d1d80a509212a705483b7b40ed15;p=friendica.git Issue 7610: Set the appropriate meta header to not being crawled --- diff --git a/mod/display.php b/mod/display.php index ee1fd91d7d..6b5edd987c 100644 --- a/mod/display.php +++ b/mod/display.php @@ -332,7 +332,7 @@ function display_content(App $a, $update = false, $update_uid = 0) } $condition = ["`id` = ? AND `item`.`uid` IN (0, ?) " . $sql_extra, $item_id, $item_uid]; - $fields = ['parent-uri', 'body', 'title', 'author-name', 'author-avatar', 'plink']; + $fields = ['parent-uri', 'body', 'title', 'author-name', 'author-avatar', 'plink', 'author-id', 'owner-id', 'contact-id']; $item = Item::selectFirstForUser(local_user(), $fields, $condition); if (!DBA::isResult($item)) { @@ -372,7 +372,10 @@ function display_content(App $a, $update = false, $update_uid = 0) $title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8', true); // allow double encoding here $author_name = htmlspecialchars($author_name, ENT_COMPAT, 'UTF-8', true); // allow double encoding here - // + if (DBA::exists('contact', ['unsearchable' => true, 'id' => [$item['contact-id'], $item['author-id'], $item['owner-id']]])) { + $a->page['htmlhead'] .= '' . "\n"; + } + $a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= ''."\n"; diff --git a/src/Module/Profile.php b/src/Module/Profile.php index 8e5bedd847..9387276d0b 100644 --- a/src/Module/Profile.php +++ b/src/Module/Profile.php @@ -83,11 +83,13 @@ class Profile extends BaseModule if (!$update) { ProfileModel::load($a, self::$which, self::$profile); + $a->page['htmlhead'] .= "\n"; + $blocked = !local_user() && !remote_user() && Config::get('system', 'block_public'); $userblock = !local_user() && !remote_user() && $a->profile['hidewall']; if (!empty($a->profile['page-flags']) && $a->profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY) { - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= '' . "\n"; } if (!empty($a->profile['openidserver'])) { @@ -108,6 +110,11 @@ class Profile extends BaseModule } $a->page['htmlhead'] .= '' . "\n"; + + if (!$a->profile['net-publish'] || $a->profile['hidewall']) { + $a->page['htmlhead'] .= '' . "\n"; + } + $a->page['htmlhead'] .= '' . "\n"; $a->page['htmlhead'] .= '' . "\n"; $a->page['htmlhead'] .= '' . "\n";