Use index for File url (urlhash)

This commit is contained in:
Mikael Nordfeldth 2016-01-07 18:13:10 +01:00
parent 6505504411
commit be58fd64f5
1 changed files with 4 additions and 4 deletions

View File

@ -997,9 +997,9 @@ function common_linkify($url) {
// Check to see whether this is a known "attachment" URL.
$f = File::getKV('url', $longurl);
if (!$f instanceof File) {
try {
$f = File::getByUrl($longurl);
} catch (NoResultException $e) {
if (common_config('attachments', 'process_links')) {
// XXX: this writes to the database. :<
try {
@ -2436,4 +2436,4 @@ function html_sprintf()
$args[$i] = htmlspecialchars($args[$i]);
}
return call_user_func_array('sprintf', $args);
}
}