Move multiple functions

move multiple smaller functions
This commit is contained in:
Adam Magness 2018-01-26 23:51:41 -05:00
parent cd3643d174
commit 1eb7c19c1e
11 changed files with 24 additions and 56 deletions

View file

@ -332,20 +332,20 @@ function dfrn_request_post(App $a)
intval($contact_record['id'])
);
} else {
$url = validate_url($url);
$url = Network::validateURL($url);
if (!$url) {
notice(L10n::t('Invalid profile URL.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED
}
if (!allowed_url($url)) {
if (!Network::allowedURL($url)) {
notice(L10n::t('Disallowed profile URL.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED
}
if (blocked_url($url)) {
if (Network::blockedURL($url)) {
notice(L10n::t('Blocked domain') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED