mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15342] Track attachments thumbnails
PHPBB3-15342
This commit is contained in:
parent
b823ae85cf
commit
83d559afc5
1 changed files with 6 additions and 1 deletions
|
@ -84,7 +84,7 @@ class storage_track extends \phpbb\db\migration\migration
|
|||
/** @var storage $storage */
|
||||
$storage = $this->container->get('storage.attachment');
|
||||
|
||||
$sql = 'SELECT physical_filename
|
||||
$sql = 'SELECT physical_filename, thumbnail
|
||||
FROM ' . ATTACHMENTS_TABLE;
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
@ -92,6 +92,11 @@ class storage_track extends \phpbb\db\migration\migration
|
|||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$storage->track_file($row['physical_filename']);
|
||||
|
||||
if($row['thumbnail'] == 1)
|
||||
{
|
||||
$storage->track_file('thumb_' . $row['physical_filename']);
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue