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.

This commit is contained in:
Brion Vibber
2010-03-10 13:39:42 -08:00
parent 4741683298
commit f02cb7c718
3 changed files with 62 additions and 6 deletions

View File

@@ -81,7 +81,13 @@ class File_oembed extends Memcached_DataObject
}
}
function saveNew($data, $file_id) {
/**
* Save embedding info for a new file.
*
* @param array $data lookup data as from File_redirection::where
* @param int $file_id
*/
function saveNew(array $data, $file_id) {
$file_oembed = new File_oembed;
$file_oembed->file_id = $file_id;
$file_oembed->version = $data->version;