forked from GNUsocial/gnu-social
File_redirection minor coding layout fix
This commit is contained in:
parent
45ee2060fa
commit
d0458b824a
@ -176,7 +176,7 @@ class File_redirection extends Managed_DataObject
|
|||||||
try {
|
try {
|
||||||
$b = File_redirection::getByUrl($in_url);
|
$b = File_redirection::getByUrl($in_url);
|
||||||
// this is a redirect to $b->file_id
|
// this is a redirect to $b->file_id
|
||||||
$a = File::getKV('id', $b->file_id);
|
$a = File::getByID($b->file_id);
|
||||||
return $a->url;
|
return $a->url;
|
||||||
} catch (NoResultException $e) {
|
} catch (NoResultException $e) {
|
||||||
// Oh well, let's keep going
|
// Oh well, let's keep going
|
||||||
@ -186,11 +186,11 @@ class File_redirection extends Managed_DataObject
|
|||||||
if ($discover) {
|
if ($discover) {
|
||||||
$ret = File_redirection::lookupWhere($in_url);
|
$ret = File_redirection::lookupWhere($in_url);
|
||||||
return $ret;
|
return $ret;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
// No manual dereferencing; leave the unknown URL as is.
|
// No manual dereferencing; leave the unknown URL as is.
|
||||||
return $in_url;
|
return $in_url;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorten a URL with the current user's configured shortening
|
* Shorten a URL with the current user's configured shortening
|
||||||
|
Loading…
Reference in New Issue
Block a user