summaryrefslogtreecommitdiff
path: root/classes
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 /classes
parent37423b12d7a58bae728476c6f1a8ff3fef4c6d9f (diff)
Handles local aliases (redirection) for file uploads attached to notices.
Diffstat (limited to 'classes')
-rw-r--r--classes/File_redirection.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/File_redirection.php b/classes/File_redirection.php
index 0eae68178..212cc3615 100644
--- a/classes/File_redirection.php
+++ b/classes/File_redirection.php
@@ -133,7 +133,7 @@ class File_redirection extends Memcached_DataObject
$file->limit(1);
$file->orderBy('len');
$file->find(true);
- if (!empty($file->id)) {
+ if (!empty($file->url) && (strlen($file->url) < strlen($long_url))) {
return $file->url;
}