mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-09 14:08:42 +00:00
Remove space from end of line
This commit is contained in:
parent
543821a1db
commit
c0b17534e3
|
|
@ -190,8 +190,8 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null)
|
||||
{
|
||||
$uploads = $this->uploadFiles(
|
||||
$request->getFiles(),
|
||||
$request->getHeader()->getAccount(),
|
||||
$request->getFiles(),
|
||||
$request->getHeader()->getAccount(),
|
||||
(string) ($request->getData('path') ?? __DIR__ . '/../../Modules/Media/Files')
|
||||
);
|
||||
|
||||
|
|
@ -292,8 +292,8 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
private static function normalizeDbPath(string $path) : string
|
||||
{
|
||||
return str_replace('\\', '/',
|
||||
str_replace(realpath(__DIR__ . '/../../'), '',
|
||||
return str_replace('\\', '/',
|
||||
str_replace(realpath(__DIR__ . '/../../'), '',
|
||||
rtrim($path, '/')
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Modules\Media\Models;
|
|||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Collection extends Media implements \Iterator
|
||||
class Collection extends Media implements \Iterator
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
@ -95,27 +95,27 @@ class Collection extends Media implements \Iterator
|
|||
{
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
public function rewind()
|
||||
{
|
||||
reset($this->sources);
|
||||
}
|
||||
|
||||
public function current()
|
||||
public function current()
|
||||
{
|
||||
return current($this->sources);
|
||||
}
|
||||
|
||||
public function key()
|
||||
public function key()
|
||||
{
|
||||
return key($this->sources);
|
||||
}
|
||||
|
||||
public function next()
|
||||
public function next()
|
||||
{
|
||||
next($this->sources);
|
||||
}
|
||||
|
||||
public function valid()
|
||||
public function valid()
|
||||
{
|
||||
return current($this->sources) !== false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class UploadFile
|
|||
|
||||
private function interlace(string $extension, string $path) /* : void */
|
||||
{
|
||||
|
||||
|
||||
if ($extension === 'png') {
|
||||
$img = imagecreatefrompng($path);
|
||||
} elseif ($extension === 'jpg' || $extension === 'jpeg') {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<tfoot>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($this->media as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
|
||||
$icon = '';
|
||||
$extensionType = \phpOMS\System\File\FileUtils::getExtensionType($value->getExtension());
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td colspan="3">
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($media as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
|
||||
$icon = '';
|
||||
$extensionType = \phpOMS\System\File\FileUtils::getExtensionType($value->getExtension());
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ echo $this->getData('nav')->render();
|
|||
$media->getExtension() === 'collection'
|
||||
&& !is_file($media->getPath() . $this->request->getData('sub'))
|
||||
) || (
|
||||
is_dir($media->getPath())
|
||||
is_dir($media->getPath())
|
||||
&& ($this->request->getData('sub') === null || is_dir($media->getPath() . $this->request->getData('sub')))
|
||||
)
|
||||
) : ?>
|
||||
|
|
@ -62,7 +62,7 @@ echo $this->getData('nav')->render();
|
|||
<td><?= $this->getHtml('Created') ?>
|
||||
<tbody>
|
||||
<?php if (!is_dir($media->getPath())) : foreach ($media as $key => $value) :
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
|
||||
$icon = '';
|
||||
$extensionType = \phpOMS\System\File\FileUtils::getExtensionType($value->getExtension());
|
||||
|
|
@ -99,12 +99,12 @@ echo $this->getData('nav')->render();
|
|||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; else : $path = is_dir($media->getPath() . $this->request->getData('sub')) && phpOMS\Utils\StringUtils::startsWith(str_replace('\\', '/', realpath($media->getPath() . $this->request->getData('sub'))), $media->getPath()) ? $media->getPath() . $this->request->getData('sub') : $media->getPath(); ?>
|
||||
<?php $list = \phpOMS\System\File\Local\Directory::list($path);
|
||||
foreach ($list as $key => $value) :
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . substr($value, strlen($media->getPath())));
|
||||
<?php $list = \phpOMS\System\File\Local\Directory::list($path);
|
||||
foreach ($list as $key => $value) :
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . substr($value, strlen($media->getPath())));
|
||||
$icon = '';
|
||||
$extensionType = \phpOMS\System\File\FileUtils::getExtensionType(!is_dir($value) ? \phpOMS\System\File\Local\File::extension($value) : 'collection');
|
||||
|
||||
|
||||
if ($extensionType === \phpOMS\System\File\ExtensionType::CODE) {
|
||||
$icon = 'file-code-o';
|
||||
} elseif ($extensionType === \phpOMS\System\File\ExtensionType::TEXT) {
|
||||
|
|
@ -144,7 +144,7 @@ echo $this->getData('nav')->render();
|
|||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<?php
|
||||
<?php
|
||||
$path = is_file($media->getPath() . $this->request->getData('sub')) && phpOMS\Utils\StringUtils::startsWith(str_replace('\\', '/', realpath($media->getPath() . $this->request->getData('sub'))), $media->getPath()) ? $media->getPath() . $this->request->getData('sub') : $media->getPath();
|
||||
if (\phpOMS\System\File\FileUtils::getExtensionType($media->getExtension()) === \phpOMS\System\File\ExtensionType::IMAGE || \phpOMS\System\File\FileUtils::getExtensionType(\phpOMS\System\File\Local\File::extension($path)) === \phpOMS\System\File\ExtensionType::IMAGE) : ?>
|
||||
<div class="h-overflow"><img src="<?= $media->isAbsolute() ? $this->printHtml($path) : $this->printHtml($this->request->getUri()->getBase() . $path); ?>"></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user