forked from GNUsocial/gnu-social
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:
@@ -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'];
|
||||
|
Reference in New Issue
Block a user