projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6505504
)
Use index for File url (urlhash)
author
Mikael Nordfeldth
<mmn@hethane.se>
Thu, 7 Jan 2016 17:13:10 +0000
(18:13 +0100)
committer
Mikael Nordfeldth
<mmn@hethane.se>
Thu, 7 Jan 2016 17:13:10 +0000
(18:13 +0100)
lib/util.php
patch
|
blob
|
history
diff --git
a/lib/util.php
b/lib/util.php
index fd903d5505a2db28a60f5f277489742516236b93..30ad757f75fcb2f1f9fffb86a62f62f169c91d9d 100644
(file)
--- a/
lib/util.php
+++ b/
lib/util.php
@@
-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 Fil
e) {
+ 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);
-}
\ No newline at end of file
+}