mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 00:38:41 +00:00
Remove whitespace
This commit is contained in:
parent
93c948c0e4
commit
da455933dd
|
|
@ -35,8 +35,8 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<td><?= $this->getHtml('Creator') ?>
|
<td><?= $this->getHtml('Creator') ?>
|
||||||
<td><?= $this->getHtml('Created') ?>
|
<td><?= $this->getHtml('Created') ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0;
|
<?php $count = 0;
|
||||||
foreach ($media as $key => $value) :
|
foreach ($media as $key => $value) :
|
||||||
$count++;
|
$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 = $fileIconFunction(\phpOMS\System\File\FileUtils::getExtensionType($value->getExtension()));
|
$icon = $fileIconFunction(\phpOMS\System\File\FileUtils::getExtensionType($value->getExtension()));
|
||||||
|
|
|
||||||
|
|
@ -36,21 +36,21 @@ class MediaView extends View
|
||||||
{
|
{
|
||||||
if (is_file($media->getPath() . $sub)
|
if (is_file($media->getPath() . $sub)
|
||||||
&& StringUtils::startsWith(
|
&& StringUtils::startsWith(
|
||||||
str_replace('\\', '/', realpath($media->getPath() . $sub)),
|
str_replace('\\', '/', realpath($media->getPath() . $sub)),
|
||||||
$media->getPath()
|
$media->getPath()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return $media->getPath() . $sub;
|
return $media->getPath() . $sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $media->getPath();
|
return $media->getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function dirPathFunction(Media $media, string $sub) : string
|
protected function dirPathFunction(Media $media, string $sub) : string
|
||||||
{
|
{
|
||||||
if (is_dir($media->getPath() . $sub)
|
if (is_dir($media->getPath() . $sub)
|
||||||
&& StringUtils::startsWith(
|
&& StringUtils::startsWith(
|
||||||
str_replace('\\', '/', realpath($media->getPath() . $sub)),
|
str_replace('\\', '/', realpath($media->getPath() . $sub)),
|
||||||
$media->getPath()
|
$media->getPath()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
@ -63,7 +63,7 @@ class MediaView extends View
|
||||||
protected function isCollectionFunction(Media $media, string $sub) : bool
|
protected function isCollectionFunction(Media $media, string $sub) : bool
|
||||||
{
|
{
|
||||||
return ($media->getExtension() === 'collection'
|
return ($media->getExtension() === 'collection'
|
||||||
&& !is_file($media->getPath() . $sub))
|
&& !is_file($media->getPath() . $sub))
|
||||||
|| (is_dir($media->getPath())
|
|| (is_dir($media->getPath())
|
||||||
&& ($sub === null || is_dir($media->getPath() . $sub))
|
&& ($sub === null || is_dir($media->getPath() . $sub))
|
||||||
);
|
);
|
||||||
|
|
@ -79,7 +79,7 @@ class MediaView extends View
|
||||||
|
|
||||||
protected function isImageFunction(Media $media, string $path) : bool
|
protected function isImageFunction(Media $media, string $path) : bool
|
||||||
{
|
{
|
||||||
return FileUtils::getExtensionType($media->getExtension()) === ExtensionType::IMAGE
|
return FileUtils::getExtensionType($media->getExtension()) === ExtensionType::IMAGE
|
||||||
|| FileUtils::getExtensionType(File::extension($path)) === ExtensionType::IMAGE;
|
|| FileUtils::getExtensionType(File::extension($path)) === ExtensionType::IMAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user