diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-10 13:39:42 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-10 15:13:16 -0800 |
commit | f02cb7c71800e6a4426b92ce04c4b8f89006b10a (patch) | |
tree | 7adba74d00c50265a1113e09ae2020293758dbf0 /classes/File.php | |
parent | 4741683298ac02e14d7380ab20f20fd8a73775e2 (diff) |
Fix for attachment "h bug": posting a shortened link to an oembed-able resource that has been previously used in the system would incorrectly save "h" as the item's type and title.
Diffstat (limited to 'classes/File.php')
-rw-r--r-- | classes/File.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php index 1b8ef1b3e..a83ecac4c 100644 --- a/classes/File.php +++ b/classes/File.php @@ -67,7 +67,14 @@ class File extends Memcached_DataObject return $att; } - function saveNew($redir_data, $given_url) { + /** + * Save a new file record. + * + * @param array $redir_data lookup data eg from File_redirection::where() + * @param string $given_url + * @return File + */ + function saveNew(array $redir_data, $given_url) { $x = new File; $x->url = $given_url; if (!empty($redir_data['protected'])) $x->protected = $redir_data['protected']; |