summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/router.php2
-rw-r--r--lib/util.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/router.php b/lib/router.php
index bd482eafa..456d1793e 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -164,11 +164,9 @@ class Router
array('action' => 'newnotice'),
array('replyto' => '[A-Za-z0-9_-]+'));
-/*
$m->connect('notice/:notice/file',
array('action' => 'file'),
array('notice' => '[0-9]+'));
-*/
$m->connect('notice/:notice',
array('action' => 'shownotice'),
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);