summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-05-27 03:47:45 -0400
committerRobin Millette <millette@controlyourself.ca>2009-05-27 03:47:45 -0400
commited1e1d9f440acfbb99c7a6e3d2b5c11fdcfa27ce (patch)
treee4362570dc97ad2b3e50ba2bc01749af5b09745d /lib/util.php
parent37423b12d7a58bae728476c6f1a8ff3fef4c6d9f (diff)
Handles local aliases (redirection) for file uploads attached to notices.
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index d56f44f7b..ab1272309 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -499,6 +499,11 @@ function common_linkify($url) {
// if this URL is an attachment, then we set class='attachment' and id='attahcment-ID'
// where ID is the id of the attachment for the given URL.
+//
+// we need a better test telling what can be shown as an attachment
+// we're currently picking up oembeds only.
+// I think the best option is another file_view table in the db
+// and associated dbobject.
$query = "select file_oembed.file_id as file_id from file join file_oembed on file.id = file_oembed.file_id where file.url='$longurl'";
$file = new File;
$file->query($query);