template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent b0eeaed240
commit 697bcf58b2
7 changed files with 13 additions and 13 deletions

View File

@ -68,7 +68,7 @@ final class Installer extends InstallerAbstract
// Because of this, the directory needs to be created manually after the Media installation
// The admin account should be the only DB account, but we use a loop of all accounts to avoid bugs
/** @var \Modules\Admin\Models\Account[] $accounts */
$accounts = AccountMapper::getAll()->execute();
$accounts = AccountMapper::getAll()->executeGetArray();
foreach ($accounts as $account) {
$collection = new Collection();

View File

@ -385,10 +385,10 @@ final class BackendController extends Controller
$id = $request->getDataString('id') ?? '';
$settings = SettingMapper::getAll()->where('module', $id)->execute();
$settings = SettingMapper::getAll()->where('module', $id)->executeGetArray();
$view->data['settings'] = $settings;
$types = MediaTypeMapper::getAll()->with('title')->where('title/language', $response->header->l11n->language)->execute();
$types = MediaTypeMapper::getAll()->with('title')->where('title/language', $response->header->l11n->language)->executeGetArray();
$view->data['types'] = $types;
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings');
@ -423,7 +423,7 @@ final class BackendController extends Controller
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response);
$view->data['type'] = $type;
$l11n = MediaTypeL11nMapper::getAll()->where('type', $type->id)->execute();
$l11n = MediaTypeL11nMapper::getAll()->where('type', $type->id)->executeGetArray();
$view->data['l11n'] = $l11n;
return $view;

View File

@ -62,7 +62,7 @@ final class SearchController extends Controller
->where('tags/title/content', $pattern)
->sort('createdAt', OrderType::DESC)
->limit(8)
->execute();
->executeGetArray();
$results = [];
foreach ($media as $file) {
@ -111,7 +111,7 @@ final class SearchController extends Controller
->where('tags/title/language', $response->header->l11n->language)
->sort('createdAt', OrderType::DESC)
->limit(8)
->execute();
->executeGetArray();
$results = [];
foreach ($media as $file) {

View File

@ -190,8 +190,8 @@ class MediaMapper extends DataMapperFactory
*/
public static function getParentCollection(string $path = '/') : ReadMapper
{
$path = \dirname($path);
$name = \basename($path);
$path = \dirname($path);
$name = \basename($path);
$virtualPath = '/' . \trim(\dirname($path), '/');
//$virtualPath = '/' . \trim(\substr($path, 0, \strripos($path, '/') + 1), '/');

View File

@ -30,8 +30,8 @@ $media = $this->data['media'] ?? [];
$account = $this->data['account'];
$accountDir = $account->id . ' ' . $account->login;
$previous = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&id=' . \reset($media)->id . '&ptype=p';
$next = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&id=' . \end($media)->id . '&ptype=n';
$previous = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&offset=' . \reset($media)->id . '&ptype=p';
$next = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&offset=' . \end($media)->id . '&ptype=n';
?>
<div class="row">

View File

@ -60,7 +60,7 @@ use phpOMS\Uri\UriFactory;
<div class="portlet-foot">
<input type="submit" id="iMediaCreate" name="mediaCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</div>
</form>
</div>
</div>

View File

@ -106,7 +106,7 @@ echo $this->data['nav']->render();
</span>
<?php endforeach; ?>
<tr><td colspan="2"><?= $this->getHtml('Description'); ?>
<tr><td colspan="2"><?= $media->description; ?>
<tr><td colspan="2"><?= $this->printHtml($media->description); ?>
</table>
</div>
<div id="iMediaFileUpdate" class="portlet-foot"