continue path handling simplifications NO_CI

This commit is contained in:
Dennis Eichhorn 2020-06-19 08:49:42 +02:00
parent 0ae0a5d454
commit 909df93f0c

View File

@ -131,16 +131,14 @@ echo $this->getData('nav')->render();
<?php elseif ($this->isTextFile($media, $path)) : ?>
<!-- if markdown show markdown editor, if image show image editor, if text file show textarea only on edit -->
<?php if (!\file_exists($media->isAbsolute() ? $path : __DIR__ . '/../../../../' . \ltrim($path, '/'))) : ?>
<?php if (!\file_exists(($media->isAbsolute() ? '' : __DIR__ . '/../../../../') . $media->getPath())) : ?>
<div class="centerText"><i class="fa fa-question fa-5x"></i></div>
<?php else : ?>
<template id="iMediaUpdateTpl">
<textarea class="textContent" form="iMediaFileUpdate" data-tpl-text="/media/content" data-tpl-value="/media/content" data-marker="tpl" name="content"></textarea>
</template>
<pre class="textContent" data-tpl-text="/media/content" data-tpl-value="/media/content"><?= $this->printHtml(
$this->getFileContent(
$media->isAbsolute() ? $path : __DIR__ . '/../../../../' . \ltrim($path, '/')
)
$this->getFileContent(($media->isAbsolute() ? '' : __DIR__ . '/../../../../') . $media->getPath())
); ?></pre>
<?php endif; ?>
<?php endif; ?>