Make validate_url more intuitive

- Remove the parameter passed by reference
- Add modified url in return value
This commit is contained in:
Hypolite Petovan 2017-12-16 19:23:22 -05:00
parent e16852c2f5
commit 1724dd3841
5 changed files with 21 additions and 20 deletions

View file

@ -377,7 +377,8 @@ function dfrn_request_post(App $a) {
);
}
else {
if (! validate_url($url)) {
$url = validate_url($url);
if (! $url) {
notice( t('Invalid profile URL.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED