forked from GNUsocial/gnu-social
Remove unused File::getAttachments()
This commit is contained in:
parent
9cab0958f5
commit
9a84907d17
@ -55,23 +55,6 @@ class File extends Memcached_DataObject
|
|||||||
return 'http://www.facebook.com/login.php' === $url;
|
return 'http://www.facebook.com/login.php' === $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the attachments for a particlar notice.
|
|
||||||
*
|
|
||||||
* @param int $post_id
|
|
||||||
* @return array of File objects
|
|
||||||
*/
|
|
||||||
static function getAttachments($post_id) {
|
|
||||||
$file = new File();
|
|
||||||
$query = "select file.* from file join file_to_post on (file_id = file.id) where post_id = " . $file->escape($post_id);
|
|
||||||
$file = Memcached_DataObject::cachedQuery('File', $query);
|
|
||||||
$att = array();
|
|
||||||
while ($file->fetch()) {
|
|
||||||
$att[] = clone($file);
|
|
||||||
}
|
|
||||||
return $att;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save a new file record.
|
* Save a new file record.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user