mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-15 20:18:40 +00:00
Use root namespace
This commit is contained in:
parent
3ffef29d36
commit
67a971fdd5
|
|
@ -38,7 +38,7 @@ class Navigation
|
||||||
*/
|
*/
|
||||||
public static function install(string $path = null, DatabasePool $dbPool = null) : void
|
public static function install(string $path = null, DatabasePool $dbPool = null) : void
|
||||||
{
|
{
|
||||||
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
$navData = \json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||||
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||||
|
|
||||||
/** @var $class \Modules\Navigation\Admin\Installer */
|
/** @var $class \Modules\Navigation\Admin\Installer */
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ class Installer extends InstallerAbstract
|
||||||
);
|
);
|
||||||
|
|
||||||
$sth->bindValue(':id', $data['id'] ?? 0, \PDO::PARAM_INT);
|
$sth->bindValue(':id', $data['id'] ?? 0, \PDO::PARAM_INT);
|
||||||
$sth->bindValue(':pid', sha1(str_replace('/', '', $data['pid'] ?? '')), \PDO::PARAM_STR);
|
$sth->bindValue(':pid', sha1(\str_replace('/', '', $data['pid'] ?? '')), \PDO::PARAM_STR);
|
||||||
$sth->bindValue(':name', $data['name'] ?? '', \PDO::PARAM_STR);
|
$sth->bindValue(':name', $data['name'] ?? '', \PDO::PARAM_STR);
|
||||||
$sth->bindValue(':type', $data['type'] ?? 1, \PDO::PARAM_INT);
|
$sth->bindValue(':type', $data['type'] ?? 1, \PDO::PARAM_INT);
|
||||||
$sth->bindValue(':subtype', $data['subtype'] ?? 2, \PDO::PARAM_INT);
|
$sth->bindValue(':subtype', $data['subtype'] ?? 2, \PDO::PARAM_INT);
|
||||||
|
|
@ -338,7 +338,7 @@ class Installer extends InstallerAbstract
|
||||||
);
|
);
|
||||||
|
|
||||||
$sth->bindValue(':id', $data['id'] ?? 0, \PDO::PARAM_INT);
|
$sth->bindValue(':id', $data['id'] ?? 0, \PDO::PARAM_INT);
|
||||||
$sth->bindValue(':pid', sha1(str_replace('/', '', $data['pid'] ?? '')), \PDO::PARAM_STR);
|
$sth->bindValue(':pid', sha1(\str_replace('/', '', $data['pid'] ?? '')), \PDO::PARAM_STR);
|
||||||
$sth->bindValue(':name', $data['name'] ?? '', \PDO::PARAM_STR);
|
$sth->bindValue(':name', $data['name'] ?? '', \PDO::PARAM_STR);
|
||||||
$sth->bindValue(':type', $data['type'] ?? 1, \PDO::PARAM_INT);
|
$sth->bindValue(':type', $data['type'] ?? 1, \PDO::PARAM_INT);
|
||||||
$sth->bindValue(':subtype', $data['subtype'] ?? 2, \PDO::PARAM_INT);
|
$sth->bindValue(':subtype', $data['subtype'] ?? 2, \PDO::PARAM_INT);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class Updater extends UpdaterAbstract
|
||||||
public static function update(DatabasePool $dbPool, InfoManager $info) : void
|
public static function update(DatabasePool $dbPool, InfoManager $info) : void
|
||||||
{
|
{
|
||||||
Directory::deletePath(__DIR__ . '/Update');
|
Directory::deletePath(__DIR__ . '/Update');
|
||||||
mkdir('Update');
|
\mkdir('Update');
|
||||||
parent::update($dbPool, $info);
|
parent::update($dbPool, $info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = $this->app->appSettings->set(
|
$success = $this->app->appSettings->set(
|
||||||
json_decode((string) $request->getData('settings'), true),
|
\json_decode((string) $request->getData('settings'), true),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -555,7 +555,7 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array<string, bool>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -738,7 +738,7 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array<string, bool>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class AccountMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string|bool>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
|
|
@ -55,7 +55,7 @@ class AccountMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Has many relation.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $hasMany = [
|
protected static $hasMany = [
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class AccountPermissionMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class GroupMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class GroupPermissionMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
|
|
|
||||||
|
|
@ -189,13 +189,13 @@ class Module
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return json_encode($this->toArray());
|
return \json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Json serialize.
|
* Json serialize.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return array<string, string|int>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -207,7 +207,7 @@ class Module
|
||||||
/**
|
/**
|
||||||
* To array
|
* To array
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array<string, string|int>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class ModuleMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, array<string, string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,9 @@ $installed = $this->app->moduleManager->getInstalledModules();
|
||||||
<td data-label="<?= $this->getHtml('ID', 0, 0) ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['id']); ?></a>
|
<td data-label="<?= $this->getHtml('ID', 0, 0) ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['id']); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['external']); ?></a>
|
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['external']); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Version') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['version']); ?></a>
|
<td data-label="<?= $this->getHtml('Version') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['version']); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Status') ?>"><a href="<?= $url; ?>"><?php if (in_array($module['name']['internal'], $active))
|
<td data-label="<?= $this->getHtml('Status') ?>"><a href="<?= $url; ?>"><?php if (\in_array($module['name']['internal'], $active))
|
||||||
echo strtolower($this->getHtml('Active'));
|
echo strtolower($this->getHtml('Active'));
|
||||||
elseif (in_array($module['name']['internal'], $installed))
|
elseif (\in_array($module['name']['internal'], $installed))
|
||||||
echo strtolower($this->getHtml('Inactive'));
|
echo strtolower($this->getHtml('Inactive'));
|
||||||
else
|
else
|
||||||
echo strtolower($this->getHtml('Available')); ?></a>
|
echo strtolower($this->getHtml('Available')); ?></a>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ $id = (string) $this->request->getData('id') ?? 1;
|
||||||
<td><?= $this->printHtml($modules[$id]['description'] ); ?>
|
<td><?= $this->printHtml($modules[$id]['description'] ); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<?php if (in_array($id, $active)) : ?>
|
<?php if (\in_array($id, $active)) : ?>
|
||||||
<button id="iModuleDeactivateButton" data-action='[
|
<button id="iModuleDeactivateButton" data-action='[
|
||||||
{
|
{
|
||||||
"key": 1, "listener": "click", "action": [
|
"key": 1, "listener": "click", "action": [
|
||||||
|
|
@ -54,7 +54,7 @@ $id = (string) $this->request->getData('id') ?? 1;
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]'><?= $this->getHtml('Deactivate'); ?></button>
|
]'><?= $this->getHtml('Deactivate'); ?></button>
|
||||||
<?php elseif (in_array($id, $installed)) : ?>
|
<?php elseif (\in_array($id, $installed)) : ?>
|
||||||
<button id="iModuleUninstallButton" data-action='[
|
<button id="iModuleUninstallButton" data-action='[
|
||||||
{
|
{
|
||||||
"key": 1, "listener": "click", "action": [
|
"key": 1, "listener": "click", "action": [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user