summaryrefslogtreecommitdiff
path: root/classes/File.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 16:27:43 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 16:27:43 -0400
commit9f356b55c6f419468771c0f3c2450010c0242abe (patch)
tree4cd175c7ef96380b5be82722581d63cf2f2fcb30 /classes/File.php
parent5dc1291b59a1079cbe9bab05d12dae06b8e4c96d (diff)
parenta645d0468b368c7c659b440f72ec80498055ac3e (diff)
Merge branch '0.9.x' into openidplugin
Conflicts: actions/login.php actions/register.php
Diffstat (limited to 'classes/File.php')
-rw-r--r--classes/File.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php
index 959301eda..b2c510340 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -95,7 +95,8 @@ class File extends Memcached_DataObject
if (empty($file_redir)) {
$redir_data = File_redirection::where($given_url);
$redir_url = $redir_data['url'];
- if ($redir_url === $given_url) {
+ // TODO: max field length
+ if ($redir_url === $given_url || strlen($redir_url) > 255) {
$x = File::saveNew($redir_data, $given_url);
$file_id = $x->id;
} else {