1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 12:05:37 +02:00

[ticket/12413] Adding the missing visibilities

PHPBB3-12413
This commit is contained in:
Nicofuma 2014-04-22 19:07:03 +02:00
parent 6c58f8cdee
commit edf0fd0fbd

View File

@ -21,15 +21,10 @@ abstract class attachments_base extends \phpbb\feed\base
*/
protected $attachments = array();
function open()
{
$this->fetch_attachments();
}
/**
* Retrieve the list of attachments that may be displayed
*/
function fetch_attachments()
protected function fetch_attachments()
{
global $db;
@ -68,13 +63,18 @@ abstract class attachments_base extends \phpbb\feed\base
$db->sql_freeresult($result);
}
public function open()
{
$this->fetch_attachments();
}
/**
* Get attachments related to a given post
*
* @param $post_id Post id
* @return mixed Attachments related to $post_id
* @param $post_id int Post id
* @return mixed Attachments related to $post_id
*/
function get_attachments($post_id)
public function get_attachments($post_id)
{
return $this->attachments[$post_id];
}