Fix footer rendering

This commit is contained in:
Dennis Eichhorn 2017-07-25 19:09:46 +02:00
parent 0bba3c6913
commit fdf17479ca
2 changed files with 4 additions and 4 deletions

View File

@ -207,7 +207,7 @@ class Controller extends ModuleAbstract implements WebInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function uploadFiles(array $files, int $account, string $basePath = '/Modules/Media/Files') : array public function uploadFiles(array $files, int $account, string $basePath = 'Modules/Media/Files') : array
{ {
$mediaCreated = []; $mediaCreated = [];
@ -222,7 +222,7 @@ class Controller extends ModuleAbstract implements WebInterface
return $mediaCreated; return $mediaCreated;
} }
public static function createMediaPath(string $basePath = '/Modules/Media/Files') : string public static function createMediaPath(string $basePath = 'Modules/Media/Files') : string
{ {
$rndPath = str_pad(dechex(rand(0, 65535)), 4, '0', STR_PAD_LEFT); $rndPath = str_pad(dechex(rand(0, 65535)), 4, '0', STR_PAD_LEFT);
return $basePath . '/' . $rndPath[0] . $rndPath[1] . '/' . $rndPath[2] . $rndPath[3]; return $basePath . '/' . $rndPath[0] . $rndPath[1] . '/' . $rndPath[2] . $rndPath[3];
@ -271,7 +271,7 @@ class Controller extends ModuleAbstract implements WebInterface
private static function normalizeDbPath(string $path) : string private static function normalizeDbPath(string $path) : string
{ {
return str_replace('\\', '/', str_replace(realpath(__DIR__ . '/../../'), '', rtrim($path, '/'))); return str_replace('\\', '/', str_replace(realpath(__DIR__ . '/../../') . '/', '', rtrim($path, '/')));
} }
} }

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->getHtml('Created') ?> <td><?= $this->getHtml('Created') ?>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="3"><?= htmlspecialchars($footerView->render(), ENT_COMPAT, 'utf-8'); ?> <td colspan="3"><?= $footerView->render(); ?>
<tbody> <tbody>
<?php $count = 0; foreach($media as $key => $value) : $count++; <?php $count = 0; foreach($media as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/media/single?{?}&id=' . $value->getId()); $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/media/single?{?}&id=' . $value->getId());