X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnoscrape.php;h=5761df3ff902be078a0d91d0baec9cdbd8a4f5e0;hb=6c341962648b73c935c2de26996b07332b776a1f;hp=87367d5369e8f3c9c6e52ba72a7e558f4e40166b;hpb=320c986e0533ce1dc32f9a9039b6ae11f9420327;p=friendica.git diff --git a/mod/noscrape.php b/mod/noscrape.php index 87367d5369..5761df3ff9 100644 --- a/mod/noscrape.php +++ b/mod/noscrape.php @@ -9,13 +9,14 @@ use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Profile; +use Friendica\Model\User; function noscrape_init(App $a) { if ($a->argc > 1) { $which = $a->argv[1]; } else { - killme(); + exit(); } $profile = 0; @@ -32,7 +33,7 @@ function noscrape_init(App $a) 'guid' => $a->profile['guid'], 'key' => $a->profile['pubkey'], 'homepage' => System::baseUrl()."/profile/{$which}", - 'comm' => ($a->profile['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY), + 'comm' => ($a->profile['account-type'] == User::ACCOUNT_TYPE_COMMUNITY), 'account-type' => $a->profile['account-type'], ]; @@ -48,7 +49,7 @@ function noscrape_init(App $a) exit; } - $keywords = ((x($a->profile, 'pub_keywords')) ? $a->profile['pub_keywords'] : ''); + $keywords = defaults($a->profile, 'pub_keywords', ''); $keywords = str_replace(['#',',',' ',',,'], ['',' ',',',','], $keywords); $keywords = explode(',', $keywords);