Backport asynchronous thumbnail generation from Kabuki.

This commit is contained in:
2017-12-20 14:51:23 +01:00
parent 981b652e25
commit 1def1484cb
9 changed files with 566 additions and 214 deletions

View File

@@ -44,6 +44,12 @@ class Dispatcher
{
return new ViewPhotoAlbum();
}
// Asynchronously generating thumbnails?
elseif (preg_match('~^/thumbnail/(?<id>\d+)/(?<width>\d+)x(?<height>\d+)(?:_(?<mode>c(t|b|s|)))?/?~', $_SERVER['PATH_INFO'], $path))
{
$_GET = array_merge($_GET, $path);
return new GenerateThumbnail();
}
// Look for particular actions...
elseif (preg_match('~^/(?<action>[a-z]+)(?:/page/(?<page>\d+))?/?~', $_SERVER['PATH_INFO'], $path) && isset($possibleActions[$path['action']]))
{