Handles local aliases (redirection) for file uploads attached to notices.

This commit is contained in:
Robin Millette
2009-05-27 03:47:45 -04:00
parent 37423b12d7
commit ed1e1d9f44
6 changed files with 62 additions and 8 deletions

View File

@@ -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);