diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 140146e..3ab5a00 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -27,18 +27,18 @@ use Modules\Media\Models\PermissionState; use Modules\Media\Models\UploadFile; use Modules\Media\Models\UploadStatus; use phpOMS\Account\PermissionType; +use phpOMS\Asset\AssetType; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\NotificationLevel; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; +use phpOMS\Model\Html\Head; use phpOMS\Model\Message\FormValidation; use phpOMS\System\File\FileUtils; use phpOMS\System\File\Local\Directory; +use phpOMS\System\MimeType; use phpOMS\Utils\Parser\Markdown\Markdown; use phpOMS\Views\View; -use phpOMS\System\MimeType; -use phpOMS\Model\Html\Head; -use phpOMS\Asset\AssetType; /** * Media class. @@ -575,7 +575,7 @@ final class ApiController extends Controller $view->setTemplate('/Modules/Media/Theme/Api/render'); } elseif ($type === 'html') { $head = new Head(); - $css = \file_get_contents(__DIR__ . '/../../../Web/Backend/css/backend-small.css'); + $css = \file_get_contents(__DIR__ . '/../../../Web/Backend/css/backend-small.css'); if ($css === false) { $css = ''; } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 7fecdaf..fed9ff0 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -20,9 +20,9 @@ use Modules\Media\Models\CollectionMapper; use Modules\Media\Models\Media; use Modules\Media\Models\MediaMapper; use Modules\Media\Models\NullMedia; -use Modules\Media\Views\MediaView; use Modules\Media\Theme\Backend\Components\Media\ElementView; use Modules\Media\Theme\Backend\Components\Media\ListView; +use Modules\Media\Views\MediaView; use phpOMS\Contract\RenderableInterface; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; @@ -178,7 +178,7 @@ final class BackendController extends Controller $id = $request->getData('id', 'int'); if ($id === 0) { - $path = \urldecode($request->getData('path')); + $path = \urldecode($request->getData('path')); $media = new NullMedia(); if (\is_file(__DIR__ . '/../Files' . $path)) { $name = \explode('.', \basename($path)); @@ -227,7 +227,7 @@ final class BackendController extends Controller /** * Create media view * - * @param Media $media Media + * @param Media $media Media * * @return View * diff --git a/Theme/Api/render.tpl.php b/Theme/Api/render.tpl.php index 399e0d8..f412f08 100644 --- a/Theme/Api/render.tpl.php +++ b/Theme/Api/render.tpl.php @@ -1,4 +1,4 @@ -getData('media'); diff --git a/Theme/Api/spreadsheetAsHtml.tpl.php b/Theme/Api/spreadsheetAsHtml.tpl.php index fe95030..8911f11 100644 --- a/Theme/Api/spreadsheetAsHtml.tpl.php +++ b/Theme/Api/spreadsheetAsHtml.tpl.php @@ -1,11 +1,11 @@ getData('media'); diff --git a/Theme/Api/wordAsHtml.tpl.php b/Theme/Api/wordAsHtml.tpl.php index 798ba13..c5f2bc1 100644 --- a/Theme/Api/wordAsHtml.tpl.php +++ b/Theme/Api/wordAsHtml.tpl.php @@ -1,16 +1,16 @@ getData('media'); $reader = IOFactory::createReader('Word2007'); -$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath()); +$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath()); $writer = new HTML($doc); diff --git a/Theme/Backend/Components/Media/ElementView.php b/Theme/Backend/Components/Media/ElementView.php index cde191a..0d84f99 100644 --- a/Theme/Backend/Components/Media/ElementView.php +++ b/Theme/Backend/Components/Media/ElementView.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace Modules\Media\Theme\Backend\Components\Media; +use Modules\Media\Models\Media; +use Modules\Media\Views\MediaView; use phpOMS\Localization\L11nManager; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; -use Modules\Media\Views\MediaView; -use Modules\Media\Models\Media; /** * Component view. diff --git a/Theme/Backend/Components/Media/audio.tpl.php b/Theme/Backend/Components/Media/audio.tpl.php index 76a6fda..30a99f3 100644 --- a/Theme/Backend/Components/Media/audio.tpl.php +++ b/Theme/Backend/Components/Media/audio.tpl.php @@ -1,6 +1,7 @@ -
diff --git a/Theme/Backend/Components/Media/csv.tpl.php b/Theme/Backend/Components/Media/csv.tpl.php index 14b91f2..1d20726 100644 --- a/Theme/Backend/Components/Media/csv.tpl.php +++ b/Theme/Backend/Components/Media/csv.tpl.php @@ -1,6 +1,7 @@ -
diff --git a/Theme/Backend/Components/Media/image.tpl.php b/Theme/Backend/Components/Media/image.tpl.php index a95158b..9d11252 100644 --- a/Theme/Backend/Components/Media/image.tpl.php +++ b/Theme/Backend/Components/Media/image.tpl.php @@ -1,6 +1,7 @@ -
diff --git a/Theme/Backend/Components/Media/json.tpl.php b/Theme/Backend/Components/Media/json.tpl.php index de10688..57ccd9c 100644 --- a/Theme/Backend/Components/Media/json.tpl.php +++ b/Theme/Backend/Components/Media/json.tpl.php @@ -1,4 +1,4 @@ -getFileContent(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath()), true); ?> diff --git a/Theme/Backend/Components/Media/markdown.tpl.php b/Theme/Backend/Components/Media/markdown.tpl.php index 3479190..e61fdd7 100644 --- a/Theme/Backend/Components/Media/markdown.tpl.php +++ b/Theme/Backend/Components/Media/markdown.tpl.php @@ -1,6 +1,7 @@ -
diff --git a/Theme/Backend/Components/Media/pdf.tpl.php b/Theme/Backend/Components/Media/pdf.tpl.php index 0f8aa10..459f084 100644 --- a/Theme/Backend/Components/Media/pdf.tpl.php +++ b/Theme/Backend/Components/Media/pdf.tpl.php @@ -13,6 +13,7 @@ declare(strict_types=1); use \phpOMS\Uri\UriFactory; + ?>
diff --git a/Theme/Backend/Components/Media/powerpoint.tpl.php b/Theme/Backend/Components/Media/powerpoint.tpl.php index 8f227f8..87d1220 100644 --- a/Theme/Backend/Components/Media/powerpoint.tpl.php +++ b/Theme/Backend/Components/Media/powerpoint.tpl.php @@ -1,13 +1,13 @@ load(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath()); $writer = new Html($presentation); diff --git a/Theme/Backend/Components/Media/spreadsheet.tpl.php b/Theme/Backend/Components/Media/spreadsheet.tpl.php index c63390d..e049ffd 100644 --- a/Theme/Backend/Components/Media/spreadsheet.tpl.php +++ b/Theme/Backend/Components/Media/spreadsheet.tpl.php @@ -1,14 +1,13 @@
@@ -38,7 +37,7 @@ use phpOMS\Utils\IO\Csv\CsvSettings; \ob_start(); $writer->save('php://output'); $data = \ob_get_clean(); - $csv = \explode("\n", \trim($data, "\n")); + $csv = \explode("\n", \trim($data, "\n")); ?>
diff --git a/Theme/Backend/Components/Media/word.tpl.php b/Theme/Backend/Components/Media/word.tpl.php index 8b25e3f..86cff28 100644 --- a/Theme/Backend/Components/Media/word.tpl.php +++ b/Theme/Backend/Components/Media/word.tpl.php @@ -1,6 +1,7 @@ -
diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index bb6f710..76a5e3e 100644 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -12,37 +12,37 @@ declare(strict_types=1); return ['Media' => [ - 'Account' => 'Account', - 'AddToCollection' => 'Zum Ordner hinzufügen', - 'Author' => 'Autor', - 'Back' => 'Zurück', - 'Changed' => 'Geändert', - 'Changedby' => 'Geändert by', - 'Created' => 'Erstellt', + 'Account' => 'Account', + 'AddToCollection' => 'Zum Ordner hinzufügen', + 'Author' => 'Autor', + 'Back' => 'Zurück', + 'Changed' => 'Geändert', + 'Changedby' => 'Geändert by', + 'Created' => 'Erstellt', 'CreateCollection' => 'Erstelle Ordner', - 'CreateFile' => 'Erstelle Datei', - 'Creator' => 'Ersteller', - 'Data' => 'Daten', - 'Description' => 'Beschreibung', - 'Edit' => 'Bearbeiten', - 'Editability' => 'Bearbeitung', - 'Extension' => 'Endung', - 'FilePath' => 'Dateipfad', - 'Files' => 'Dateien', - 'Media' => 'Media', - 'Name' => 'Name', - 'Path' => 'Pfad', - 'PathSettings' => 'Pfad Einstellung', - 'Permission' => 'Rechte', - 'Preview' => 'Vorschau', - 'RandomPath' => 'Zufälliger Pfad', - 'Select' => 'Auswahl', - 'Settings' => 'Einstellungen', - 'Size' => 'Größe', - 'Type' => 'Typ', - 'Upload' => 'Hochladen', - 'VirtualPath' => 'Virtueller Pfad', - 'Visibility' => 'Sichtbarkeit', - 'GroupUser' => '', - 'Add' => '', + 'CreateFile' => 'Erstelle Datei', + 'Creator' => 'Ersteller', + 'Data' => 'Daten', + 'Description' => 'Beschreibung', + 'Edit' => 'Bearbeiten', + 'Editability' => 'Bearbeitung', + 'Extension' => 'Endung', + 'FilePath' => 'Dateipfad', + 'Files' => 'Dateien', + 'Media' => 'Media', + 'Name' => 'Name', + 'Path' => 'Pfad', + 'PathSettings' => 'Pfad Einstellung', + 'Permission' => 'Rechte', + 'Preview' => 'Vorschau', + 'RandomPath' => 'Zufälliger Pfad', + 'Select' => 'Auswahl', + 'Settings' => 'Einstellungen', + 'Size' => 'Größe', + 'Type' => 'Typ', + 'Upload' => 'Hochladen', + 'VirtualPath' => 'Virtueller Pfad', + 'Visibility' => 'Sichtbarkeit', + 'GroupUser' => '', + 'Add' => '', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index f3af7fe..458c41a 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -12,37 +12,37 @@ declare(strict_types=1); return ['Media' => [ - 'Account' => 'Account', - 'AddToCollection' => 'Add to collection', - 'Author' => 'Author', - 'Back' => 'Back', - 'Changed' => 'Changed', - 'Changedby' => 'Changed by', - 'Created' => 'Created', + 'Account' => 'Account', + 'AddToCollection' => 'Add to collection', + 'Author' => 'Author', + 'Back' => 'Back', + 'Changed' => 'Changed', + 'Changedby' => 'Changed by', + 'Created' => 'Created', 'CreateCollection' => 'Create Collection', - 'CreateFile' => 'Create File', - 'Creator' => 'Creator', - 'Data' => 'Data', - 'Description' => 'Description', - 'Edit' => 'Edit', - 'Editability' => 'Editability', - 'Extension' => 'Extension', - 'FilePath' => 'File Path', - 'Files' => 'Files', - 'Media' => 'Media', - 'Name' => 'Name', - 'Path' => 'Path', - 'PathSettings' => 'Path Settings', - 'Permission' => 'Permission', - 'Preview' => 'Preview', - 'RandomPath' => 'Random Path', - 'Select' => 'Select', - 'Settings' => 'Settings', - 'Size' => 'Size', - 'Type' => 'Type', - 'Upload' => 'Upload', - 'VirtualPath' => 'Virtual Path', - 'Visibility' => 'Visibility', - 'GroupUser' => '', - 'Add' => '', + 'CreateFile' => 'Create File', + 'Creator' => 'Creator', + 'Data' => 'Data', + 'Description' => 'Description', + 'Edit' => 'Edit', + 'Editability' => 'Editability', + 'Extension' => 'Extension', + 'FilePath' => 'File Path', + 'Files' => 'Files', + 'Media' => 'Media', + 'Name' => 'Name', + 'Path' => 'Path', + 'PathSettings' => 'Path Settings', + 'Permission' => 'Permission', + 'Preview' => 'Preview', + 'RandomPath' => 'Random Path', + 'Select' => 'Select', + 'Settings' => 'Settings', + 'Size' => 'Size', + 'Type' => 'Type', + 'Upload' => 'Upload', + 'VirtualPath' => 'Virtual Path', + 'Visibility' => 'Visibility', + 'GroupUser' => '', + 'Add' => '', ]]; diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index aa98cde..232f548 100755 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -22,7 +22,7 @@ include __DIR__ . '/template-functions.php'; /** @var \Modules\Media\Models\Media $media */ $media = $this->getData('media'); -$view = $this->getData('view'); +$view = $this->getData('view'); /** @var \Modules\Media\Views\MediaView $this */ echo $this->getData('nav')->render();