mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 11:03:17 +00:00
Merge pull request #1091 from nlegoff/yeah-yeah-yeah
[3.8.6][PHRAS-136] Add static file mode to serve thumbnails
This commit is contained in:
@@ -445,6 +445,21 @@ class databox extends base
|
||||
|
||||
public function unmount_databox()
|
||||
{
|
||||
if ($this->app['phraseanet.static-file-factory']->isStaticFileModeEnabled()) {
|
||||
$sql = "SELECT path, file FROM subdef WHERE `name`='thumbnail'";
|
||||
$stmt = $this->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
foreach ($rows as $row) {
|
||||
$pathfile = $this->app['phraseanet.thumb-symlinker']->getSymlinkPath(sprintf(
|
||||
'%s/%s',
|
||||
rtrim($row['path'], '/'),
|
||||
$row['file']
|
||||
));
|
||||
$this->app['filesystem']->remove($pathfile);
|
||||
}
|
||||
}
|
||||
foreach ($this->get_collections() as $collection) {
|
||||
$collection->unmount_collection($this->app);
|
||||
}
|
||||
|
Reference in New Issue
Block a user