diff --git a/Admin/Installer.php b/Admin/Installer.php index 7d6b896..dc2a2bd 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -19,7 +19,6 @@ use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\HttpResponse; use phpOMS\Module\InstallerAbstract; use phpOMS\System\File\PathException; -use phpOMS\Uri\HttpUri; /** * Installer class. @@ -121,7 +120,7 @@ final class Installer extends InstallerAbstract $module = $app->moduleManager->get('Messages'); $response = new HttpResponse(); - $request = new HttpRequest(new HttpUri('')); + $request = new HttpRequest(); $request->header->account = 1; $request->setData('from', $data['from'] ?? ''); @@ -146,7 +145,7 @@ final class Installer extends InstallerAbstract foreach ($data['l11n'] as $language => $l11n) { $l11nResponse = new HttpResponse(); - $l11nRequest = new HttpRequest(new HttpUri('')); + $l11nRequest = new HttpRequest(); $l11nRequest->header->account = 1; $l11nRequest->setData('email', $emailId); diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index e562fb4..cd77352 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/messages/dashboard.*$' => [ + '^.*/messages/dashboard(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageInbox', 'verb' => RouteVerb::GET, @@ -29,7 +29,7 @@ return [ ], ], ], - '^.*/messages/outbox.*$' => [ + '^.*/messages/outbox(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageOutbox', 'verb' => RouteVerb::GET, @@ -40,7 +40,7 @@ return [ ], ], ], - '^.*/messages/trash.*$' => [ + '^.*/messages/trash(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageTrash', 'verb' => RouteVerb::GET, @@ -51,7 +51,7 @@ return [ ], ], ], - '^.*/messages/spam.*$' => [ + '^.*/messages/spam(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSpam', 'verb' => RouteVerb::GET, @@ -62,7 +62,7 @@ return [ ], ], ], - '^.*/messages/settings.*$' => [ + '^.*/messages/settings(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSettings', 'verb' => RouteVerb::GET, @@ -73,7 +73,7 @@ return [ ], ], ], - '^.*/messages/template/list.*$' => [ + '^.*/messages/template/list(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageTemplates', 'verb' => RouteVerb::GET, @@ -84,7 +84,7 @@ return [ ], ], ], - '^.*/messages/template/single.*$' => [ + '^.*/messages/template/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageTemplate', 'verb' => RouteVerb::GET, @@ -95,7 +95,7 @@ return [ ], ], ], - '^.*/messages/mail/create.*$' => [ + '^.*/messages/mail/create(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageCreate', 'verb' => RouteVerb::GET, @@ -106,7 +106,7 @@ return [ ], ], ], - '^.*/messages/mail/single.*$' => [ + '^.*/messages/mail/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView', 'verb' => RouteVerb::GET, @@ -117,7 +117,7 @@ return [ ], ], ], - '^.*/messages/mail/single.*$' => [ + '^.*/messages/mail/view(\?.*$|$)' => [ [ 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView', 'verb' => RouteVerb::GET, diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 5af0f3a..2440216 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -19,6 +19,7 @@ use Modules\Messages\Models\Email; use Modules\Messages\Models\EmailL11n; use Modules\Messages\Models\EmailL11nMapper; use Modules\Messages\Models\EmailMapper; +use phpOMS\Localization\ISO639x1Enum; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; @@ -153,14 +154,12 @@ final class ApiController extends Controller */ private function createEmailL11nFromRequest(RequestAbstract $request) : EmailL11n { - $itemL11n = new EmailL11n(); - $itemL11n->email = $request->getDataInt('email') ?? 0; - $itemL11n->setLanguage( - $request->getDataString('language') ?? $request->header->l11n->language - ); - $itemL11n->subject = $request->getDataString('subject') ?? ''; - $itemL11n->body = $request->getDataString('body') ?? ''; - $itemL11n->bodyAlt = $request->getDataString('bodyalt') ?? ''; + $itemL11n = new EmailL11n(); + $itemL11n->email = $request->getDataInt('email') ?? 0; + $itemL11n->language = ISO639x1Enum::tryFromValue($request->getDataString('language')) ?? $request->header->l11n->language; + $itemL11n->subject = $request->getDataString('subject') ?? ''; + $itemL11n->body = $request->getDataString('body') ?? ''; + $itemL11n->bodyAlt = $request->getDataString('bodyalt') ?? ''; return $itemL11n; } diff --git a/Models/Email.php b/Models/Email.php index 3999f11..5ebe854 100755 --- a/Models/Email.php +++ b/Models/Email.php @@ -42,8 +42,6 @@ class Email extends MailEmail implements \JsonSerializable public int $status = 0; - public array $media = []; - public array $l11n = []; public bool $isTemplate = false; @@ -85,7 +83,7 @@ class Email extends MailEmail implements \JsonSerializable public function toArray() : array { return [ - 'id' => $this->id, + 'id' => $this->id, ]; } @@ -96,4 +94,6 @@ class Email extends MailEmail implements \JsonSerializable { return $this->toArray(); } + + use \Modules\Media\Models\MediaListTrait; } diff --git a/Models/EmailL11n.php b/Models/EmailL11n.php index 0f07cf0..d62f30b 100644 --- a/Models/EmailL11n.php +++ b/Models/EmailL11n.php @@ -106,8 +106,8 @@ class EmailL11n implements \JsonSerializable public function toArray() : array { return [ - 'id' => $this->id, - 'language' => $this->language, + 'id' => $this->id, + 'language' => $this->language, ]; } diff --git a/Models/EmailL11nMapper.php b/Models/EmailL11nMapper.php index e06bcfd..a5a3f33 100644 --- a/Models/EmailL11nMapper.php +++ b/Models/EmailL11nMapper.php @@ -36,12 +36,12 @@ final class EmailL11nMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'messages_mail_l11n_id' => ['name' => 'messages_mail_l11n_id', 'type' => 'int', 'internal' => 'id'], - 'messages_mail_l11n_subject' => ['name' => 'messages_mail_l11n_subject', 'type' => 'string', 'internal' => 'subject'], - 'messages_mail_l11n_body' => ['name' => 'messages_mail_l11n_body', 'type' => 'string', 'internal' => 'body'], - 'messages_mail_l11n_bodyalt' => ['name' => 'messages_mail_l11n_bodyalt', 'type' => 'string', 'internal' => 'bodyAlt'], - 'messages_mail_l11n_message' => ['name' => 'messages_mail_l11n_message', 'type' => 'int', 'internal' => 'email'], - 'messages_mail_l11n_lang' => ['name' => 'messages_mail_l11n_lang', 'type' => 'string', 'internal' => 'language'], + 'messages_mail_l11n_id' => ['name' => 'messages_mail_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'messages_mail_l11n_subject' => ['name' => 'messages_mail_l11n_subject', 'type' => 'string', 'internal' => 'subject'], + 'messages_mail_l11n_body' => ['name' => 'messages_mail_l11n_body', 'type' => 'string', 'internal' => 'body'], + 'messages_mail_l11n_bodyalt' => ['name' => 'messages_mail_l11n_bodyalt', 'type' => 'string', 'internal' => 'bodyAlt'], + 'messages_mail_l11n_message' => ['name' => 'messages_mail_l11n_message', 'type' => 'int', 'internal' => 'email'], + 'messages_mail_l11n_lang' => ['name' => 'messages_mail_l11n_lang', 'type' => 'string', 'internal' => 'language'], ]; /** diff --git a/Models/EmailMapper.php b/Models/EmailMapper.php index 7f6b131..7e2c660 100755 --- a/Models/EmailMapper.php +++ b/Models/EmailMapper.php @@ -38,29 +38,29 @@ final class EmailMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'messages_mail_id' => ['name' => 'messages_mail_id', 'type' => 'int', 'internal' => 'id'], - 'messages_mail_msgid' => ['name' => 'messages_mail_msgid', 'type' => 'string', 'internal' => 'messageId'], - 'messages_mail_status' => ['name' => 'messages_mail_status', 'type' => 'int', 'internal' => 'status'], - 'messages_mail_to' => ['name' => 'messages_mail_to', 'type' => 'Json', 'internal' => 'to'], - 'messages_mail_from' => ['name' => 'messages_mail_from', 'type' => 'Json', 'internal' => 'from'], - 'messages_mail_from_account' => ['name' => 'messages_mail_from_account', 'type' => 'int', 'internal' => 'account'], - 'messages_mail_cc' => ['name' => 'messages_mail_cc', 'type' => 'Json', 'internal' => 'cc'], - 'messages_mail_bcc' => ['name' => 'messages_mail_bcc', 'type' => 'Json', 'internal' => 'bcc'], - 'messages_mail_replyto' => ['name' => 'messages_mail_replyto', 'type' => 'Json', 'internal' => 'replyTo'], - 'messages_mail_confimation' => ['name' => 'messages_mail_confimation', 'type' => 'string', 'internal' => 'confirmationAddress'], - 'messages_mail_subject' => ['name' => 'messages_mail_subject', 'type' => 'string', 'internal' => 'subject'], - 'messages_mail_body' => ['name' => 'messages_mail_body', 'type' => 'string', 'internal' => 'body'], - 'messages_mail_bodyalt' => ['name' => 'messages_mail_bodyalt', 'type' => 'string', 'internal' => 'bodyAlt'], - 'messages_mail_bodymime' => ['name' => 'messages_mail_bodymime', 'type' => 'string', 'internal' => 'bodyMime'], - 'messages_mail_ical' => ['name' => 'messages_mail_ical', 'type' => 'string', 'internal' => 'ical'], - 'messages_mail_created_at' => ['name' => 'messages_mail_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], - 'messages_mail_sent' => ['name' => 'messages_mail_sent', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], - 'messages_mail_received' => ['name' => 'messages_mail_received', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], - 'messages_mail_priority' => ['name' => 'messages_mail_priority', 'type' => 'int', 'internal' => 'priority'], - 'messages_mail_encoding' => ['name' => 'messages_mail_encoding', 'type' => 'string', 'internal' => 'encoding', 'private' => true], - 'messages_mail_contenttype' => ['name' => 'messages_mail_contenttype', 'type' => 'string', 'internal' => 'contentType', 'private' => true], - 'messages_mail_charset' => ['name' => 'messages_mail_charset', 'type' => 'string', 'internal' => 'charset'], - 'messages_mail_template' => ['name' => 'messages_mail_template', 'type' => 'bool', 'internal' => 'isTemplate'], + 'messages_mail_id' => ['name' => 'messages_mail_id', 'type' => 'int', 'internal' => 'id'], + 'messages_mail_msgid' => ['name' => 'messages_mail_msgid', 'type' => 'string', 'internal' => 'messageId'], + 'messages_mail_status' => ['name' => 'messages_mail_status', 'type' => 'int', 'internal' => 'status'], + 'messages_mail_to' => ['name' => 'messages_mail_to', 'type' => 'Json', 'internal' => 'to'], + 'messages_mail_from' => ['name' => 'messages_mail_from', 'type' => 'Json', 'internal' => 'from'], + 'messages_mail_from_account' => ['name' => 'messages_mail_from_account', 'type' => 'int', 'internal' => 'account'], + 'messages_mail_cc' => ['name' => 'messages_mail_cc', 'type' => 'Json', 'internal' => 'cc'], + 'messages_mail_bcc' => ['name' => 'messages_mail_bcc', 'type' => 'Json', 'internal' => 'bcc'], + 'messages_mail_replyto' => ['name' => 'messages_mail_replyto', 'type' => 'Json', 'internal' => 'replyTo'], + 'messages_mail_confimation' => ['name' => 'messages_mail_confimation', 'type' => 'string', 'internal' => 'confirmationAddress'], + 'messages_mail_subject' => ['name' => 'messages_mail_subject', 'type' => 'string', 'internal' => 'subject'], + 'messages_mail_body' => ['name' => 'messages_mail_body', 'type' => 'string', 'internal' => 'body'], + 'messages_mail_bodyalt' => ['name' => 'messages_mail_bodyalt', 'type' => 'string', 'internal' => 'bodyAlt'], + 'messages_mail_bodymime' => ['name' => 'messages_mail_bodymime', 'type' => 'string', 'internal' => 'bodyMime'], + 'messages_mail_ical' => ['name' => 'messages_mail_ical', 'type' => 'string', 'internal' => 'ical'], + 'messages_mail_created_at' => ['name' => 'messages_mail_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], + 'messages_mail_sent' => ['name' => 'messages_mail_sent', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], + 'messages_mail_received' => ['name' => 'messages_mail_received', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], + 'messages_mail_priority' => ['name' => 'messages_mail_priority', 'type' => 'int', 'internal' => 'priority'], + 'messages_mail_encoding' => ['name' => 'messages_mail_encoding', 'type' => 'string', 'internal' => 'encoding', 'private' => true], + 'messages_mail_contenttype' => ['name' => 'messages_mail_contenttype', 'type' => 'string', 'internal' => 'contentType', 'private' => true], + 'messages_mail_charset' => ['name' => 'messages_mail_charset', 'type' => 'string', 'internal' => 'charset'], + 'messages_mail_template' => ['name' => 'messages_mail_template', 'type' => 'bool', 'internal' => 'isTemplate'], ]; /** @@ -70,13 +70,13 @@ final class EmailMapper extends DataMapperFactory * @since 1.0.0 */ public const HAS_MANY = [ - 'media' => [ + 'files' => [ 'mapper' => MediaMapper::class, 'table' => 'messages_mail_media', 'external' => 'messages_mail_media_dst', 'self' => 'messages_mail_media_src', ], - 'l11n' => [ + 'l11n' => [ 'mapper' => EmailL11nMapper::class, 'table' => 'messages_mail_l11n', 'self' => 'messages_mail_l11n_message', @@ -92,8 +92,8 @@ final class EmailMapper extends DataMapperFactory */ public const BELONGS_TO = [ 'account' => [ - 'mapper' => AccountMapper::class, - 'external' => 'messages_mail_from_account', + 'mapper' => AccountMapper::class, + 'external' => 'messages_mail_from_account', ], ]; diff --git a/Theme/Backend/mail-dashboard.tpl.php b/Theme/Backend/mail-dashboard.tpl.php index a91f0fe..02ed875 100755 --- a/Theme/Backend/mail-dashboard.tpl.php +++ b/Theme/Backend/mail-dashboard.tpl.php @@ -44,7 +44,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/messages/mail/single?{?}&id=' . $value->uid); ?> + $url = UriFactory::build('{/base}/messages/mail/view?{?}&id=' . $value->uid); ?> printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>> diff --git a/Theme/Backend/mail-out-view.tpl.php b/Theme/Backend/mail-out-view.tpl.php index 3d7b7c6..4ea41d7 100755 --- a/Theme/Backend/mail-out-view.tpl.php +++ b/Theme/Backend/mail-out-view.tpl.php @@ -40,7 +40,7 @@ echo $this->data['nav']->render(); ?> printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('messages/mail/single?{?}&id=' . $value->uid); ?> + $url = \phpOMS\Uri\UriFactory::build('messages/mail/view?{?}&id=' . $value->uid); ?> printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>> diff --git a/Theme/Backend/mail-spam-view.tpl.php b/Theme/Backend/mail-spam-view.tpl.php index 3d7b7c6..4ea41d7 100755 --- a/Theme/Backend/mail-spam-view.tpl.php +++ b/Theme/Backend/mail-spam-view.tpl.php @@ -40,7 +40,7 @@ echo $this->data['nav']->render(); ?> printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('messages/mail/single?{?}&id=' . $value->uid); ?> + $url = \phpOMS\Uri\UriFactory::build('messages/mail/view?{?}&id=' . $value->uid); ?> printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>> diff --git a/Theme/Backend/mail-templates.tpl.php b/Theme/Backend/mail-templates.tpl.php index 5665caf..f159fc4 100755 --- a/Theme/Backend/mail-templates.tpl.php +++ b/Theme/Backend/mail-templates.tpl.php @@ -34,7 +34,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/messages/template/single?{?}&id=' . $value->id); ?> + $url = UriFactory::build('{/base}/messages/template/view?{?}&id=' . $value->id); ?> printHtml(empty($value->subject) ? $value->getL11nByLanguage($this->response->header->l11n->language)->subject : $value->subject); ?> diff --git a/Theme/Backend/mail-trash-view.tpl.php b/Theme/Backend/mail-trash-view.tpl.php index e5c3313..1c2b4b5 100755 --- a/Theme/Backend/mail-trash-view.tpl.php +++ b/Theme/Backend/mail-trash-view.tpl.php @@ -40,7 +40,7 @@ echo $this->data['nav']->render(); ?> printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('messages/mail/single?{?}&id=' . $value->uid); ?> + $url = \phpOMS\Uri\UriFactory::build('messages/mail/view?{?}&id=' . $value->uid); ?> printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>> diff --git a/tests/Autoloader.php b/tests/Autoloader.php index baf6e3f..6620ba6 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -75,8 +75,8 @@ final class Autoloader */ public static function defaultAutoloader(string $class) : void { - $class = \ltrim($class, '\\'); - $class = \strtr($class, '_\\', '//'); + $class = \ltrim($class, '\\'); + $class = \strtr($class, '_\\', '//'); if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) { $class = \is_dir(__DIR__ . '/Web') ? $class : \str_replace('Web/', 'MainRepository/Web/', $class); diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index ddc049d..5e2f270 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -1,4 +1,15 @@ [ + 'db' => [ 'core' => [ 'masters' => [ - 'admin' => [ + 'admin' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -80,7 +91,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'insert' => [ + 'insert' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -90,7 +101,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'select' => [ + 'select' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -100,7 +111,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'update' => [ + 'update' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -110,7 +121,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'delete' => [ + 'delete' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -120,7 +131,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'schema' => [ + 'schema' => [ 'db' => 'mysql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '3306', /* db host port */ @@ -132,7 +143,7 @@ $CONFIG = [ ], ], 'postgresql' => [ - 'admin' => [ + 'admin' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -142,7 +153,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'insert' => [ + 'insert' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -152,7 +163,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'select' => [ + 'select' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -162,7 +173,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'update' => [ + 'update' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -172,7 +183,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'delete' => [ + 'delete' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -182,7 +193,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'schema' => [ + 'schema' => [ 'db' => 'pgsql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '5432', /* db host port */ @@ -194,37 +205,37 @@ $CONFIG = [ ], ], 'sqlite' => [ - 'admin' => [ + 'admin' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'insert' => [ + 'insert' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'select' => [ + 'select' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'update' => [ + 'update' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'delete' => [ + 'delete' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'schema' => [ + 'schema' => [ 'db' => 'sqlite', /* db type */ 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ 'weight' => 1000, /* db table prefix */ @@ -232,7 +243,7 @@ $CONFIG = [ ], ], 'mssql' => [ - 'admin' => [ + 'admin' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -242,7 +253,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'insert' => [ + 'insert' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -252,7 +263,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'select' => [ + 'select' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -262,7 +273,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'update' => [ + 'update' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -272,7 +283,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'delete' => [ + 'delete' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -282,7 +293,7 @@ $CONFIG = [ 'weight' => 1000, /* db table prefix */ 'datetimeformat' => 'Y-m-d H:i:s', ], - 'schema' => [ + 'schema' => [ 'db' => 'mssql', /* db type */ 'host' => '127.0.0.1', /* db host address */ 'port' => '1433', /* db host port */ @@ -322,16 +333,16 @@ $CONFIG = [ 'password' => '123456', ], ], - 'log' => [ + 'log' => [ 'file' => [ 'path' => __DIR__ . '/Logs', ], ], - 'page' => [ + 'page' => [ 'root' => '/', 'https' => false, ], - 'app' => [ + 'app' => [ 'path' => __DIR__, 'default' => [ 'app' => 'Backend', @@ -350,7 +361,7 @@ $CONFIG = [ ], ], ], - 'socket' => [ + 'socket' => [ 'master' => [ 'host' => '127.0.0.1', 'limit' => 300, @@ -360,7 +371,7 @@ $CONFIG = [ 'language' => [ 'en', ], - 'apis' => [ + 'apis' => [ ], ];