diff --git a/Controller/ApiController.php b/Controller/ApiController.php index a3cb712..aa0f406 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -308,8 +308,10 @@ final class ApiController extends Controller { /** @var Media $old */ $old = clone MediaMapper::get((int) $request->getData('id')); + /** @var Media $new */ $new = $this->updateMediaFromRequest($request); + $this->updateModel($request->getHeader()->getAccount(), $old, $new, MediaMapper::class, 'media', $request->getOrigin()); $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Media', 'Media successfully updated', $new); } diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index d1fcda7..6d5d79b 100755 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -19,11 +19,10 @@ use \phpOMS\Uri\UriFactory; include __DIR__ . '/template-functions.php'; -/** - * @var \Modules\Media\Views\MediaView $this - * @var \Modules\Media\Models\Media $media - */ +/** @var \Modules\Media\Models\Media $media */ $media = $this->getData('media'); + +/** @var \Modules\Media\Views\MediaView $this */ echo $this->getData('nav')->render(); ?> request->getData('path') !== null) : ?> @@ -51,6 +50,21 @@ echo $this->getData('nav')->render();
= $this->printHtml(
$this->getFileContent(