mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-02 10:48:42 +00:00
fix html
This commit is contained in:
commit
78f0f3753d
|
|
@ -15,17 +15,17 @@ declare(strict_types=1);
|
|||
namespace Modules\Media\Admin;
|
||||
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\Media\Controller\ApiController;
|
||||
use Modules\Media\Models\Collection;
|
||||
use Modules\Media\Models\CollectionMapper;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\InstallerAbstract;
|
||||
use phpOMS\System\File\PathException;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\System\File\Local\File;
|
||||
use Modules\Media\Models\UploadFile;
|
||||
use Modules\Media\Models\Media;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Controller\ApiController;
|
||||
use Modules\Media\Models\UploadFile;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\InstallerAbstract;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\System\File\Local\File;
|
||||
use phpOMS\System\File\PathException;
|
||||
|
||||
/**
|
||||
* Installer class.
|
||||
|
|
@ -78,7 +78,7 @@ final class Installer extends InstallerAbstract
|
|||
|
||||
$result = [
|
||||
'collection' => [],
|
||||
'upload' => [],
|
||||
'upload' => [],
|
||||
];
|
||||
|
||||
\mkdir(__DIR__ . '/tmp');
|
||||
|
|
@ -112,10 +112,10 @@ final class Installer extends InstallerAbstract
|
|||
{
|
||||
if (!isset($data['path'])) {
|
||||
$dirPath = __DIR__ . '/../../../Modules/Media/Files' . ($data['virtualPath'] ?? '/') . '/' . ($data['name'] ?? '');
|
||||
$path = '/Modules/Media/Files' . ($data['virtualPath'] ?? '') . '/' . ($data['name'] ?? '');
|
||||
$path = '/Modules/Media/Files' . ($data['virtualPath'] ?? '') . '/' . ($data['name'] ?? '');
|
||||
} else {
|
||||
$dirPath = $data['path'] . '/' . ($data['name'] ?? '');
|
||||
$path = $data['path'] ?? '/Modules/Media/Files' . '/' . ($data['name'] ?? '');
|
||||
$path = $data['path'] ?? '/Modules/Media/Files' . '/' . ($data['name'] ?? '');
|
||||
}
|
||||
|
||||
$collection = new Collection();
|
||||
|
|
@ -152,10 +152,10 @@ final class Installer extends InstallerAbstract
|
|||
File::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
||||
|
||||
$files[] = [
|
||||
'size' => \filesize(__DIR__ . '/tmp' . $file),
|
||||
'name' => \basename($file),
|
||||
'size' => \filesize(__DIR__ . '/tmp' . $file),
|
||||
'name' => \basename($file),
|
||||
'tmp_name' => __DIR__ . '/tmp' . $file,
|
||||
'error' => \UPLOAD_ERR_OK,
|
||||
'error' => \UPLOAD_ERR_OK,
|
||||
];
|
||||
} if (\is_dir(__DIR__ . '/../../..' . $file)) {
|
||||
Directory::copy(__DIR__ . '/../../..' . $file, __DIR__ . '/tmp' . $file);
|
||||
|
|
@ -171,10 +171,10 @@ final class Installer extends InstallerAbstract
|
|||
}
|
||||
|
||||
$files[] = [
|
||||
'size' => \filesize($item->getPathname()),
|
||||
'name' => \basename($item->getPathname()),
|
||||
'size' => \filesize($item->getPathname()),
|
||||
'name' => \basename($item->getPathname()),
|
||||
'tmp_name' => $item->getPathname(),
|
||||
'error' => \UPLOAD_ERR_OK,
|
||||
'error' => \UPLOAD_ERR_OK,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use phpOMS\Autoloader;
|
||||
|
||||
use PhpOffice\PhpWord\IOFactory;
|
||||
use PhpOffice\PhpWord\Writer\HTML;
|
||||
use phpOMS\Autoloader;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ use phpOMS\Utils\IO\Csv\CsvSettings;
|
|||
<div class="tab-content">
|
||||
<input type="radio" id="media-c-tab-1" name="tabular-1" checked>
|
||||
<div class="tab">
|
||||
<table class="default">
|
||||
<?php
|
||||
$f = \fopen(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath(), 'r');
|
||||
|
||||
echo '<table class="default">';
|
||||
$delim = CsvSettings::getFileDelimiter($f, 3);
|
||||
while (($line = \fgetcsv($f, 0, $delim)) !== false) {
|
||||
echo '<tr>';
|
||||
|
|
@ -26,8 +26,8 @@ use phpOMS\Utils\IO\Csv\CsvSettings;
|
|||
}
|
||||
|
||||
\fclose($f);
|
||||
echo '</table>';
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<input type="radio" id="media-c-tab-2" name="tabular-1">
|
||||
<div class="tab">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use phpOMS\Autoloader;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Csv;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../../../Resources/');
|
||||
|
|
|
|||
|
|
@ -12,11 +12,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use \phpOMS\System\File\FileUtils;
|
||||
use \phpOMS\System\File\Local\File;
|
||||
use \phpOMS\Uri\UriFactory;
|
||||
use phpOMS\Utils\IO\Csv\CsvSettings;
|
||||
use phpOMS\Utils\Parser\Markdown\Markdown;
|
||||
use phpOMS\Utils\Converter\FileSizeType;
|
||||
|
||||
include __DIR__ . '/template-functions.php';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user