From 657bc5ef777433ece48c2d9ede3efe0e80758b96 Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Fri, 7 Jul 2023 14:36:54 +0300 Subject: [PATCH] =?UTF-8?q?[*]=20=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=BF=D0=BE=D0=B4=20=D0=B0=D0=B2=D1=82=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B4=D0=B0=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/App.class.php | 2 +- db/migrations/20230405185037_users.php | 2 +- db/migrations/20230405185040_roles.php | 2 +- db/migrations/20230405185104_threads.php | 2 +- db/migrations/20230405185109_threads_history.php | 2 +- templates/index.twig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/lib/Core/App.class.php b/core/lib/Core/App.class.php index 17b3361..0beba72 100644 --- a/core/lib/Core/App.class.php +++ b/core/lib/Core/App.class.php @@ -54,7 +54,7 @@ 'userDataTable' => User::isAuthorized() ? str_replace( 'getAllUserData(), 'Информация о пользователе') + SystemFunctions::arrayToTable($USER->getAllUserData(), 'Информация о текущем пользователе') ) : '', 'statString' => 'Использовано ОЗУ: ' . round(memory_get_usage() / 1024 / 1024, 2) . ' МБ / БД: ' diff --git a/db/migrations/20230405185037_users.php b/db/migrations/20230405185037_users.php index 263d011..176e934 100644 --- a/db/migrations/20230405185037_users.php +++ b/db/migrations/20230405185037_users.php @@ -42,7 +42,7 @@ final class Users extends AbstractMigration ->addColumn('token', 'string', ['limit' => 255, 'default' => null]) ->addColumn('last_active', 'string', ['limit' => 100, 'default' => null]) ->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP']) - ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null]) + ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP']) ->addIndex(['login']) ->addIndex(['token']) ->addIndex(['email']) diff --git a/db/migrations/20230405185040_roles.php b/db/migrations/20230405185040_roles.php index c76c1d8..3d98daa 100644 --- a/db/migrations/20230405185040_roles.php +++ b/db/migrations/20230405185040_roles.php @@ -48,7 +48,7 @@ final class Roles extends AbstractMigration $table->addColumn('name', 'text', ['default' => null]) ->addColumn('description', 'text', ['default' => null]) ->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP']) - ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null]) + ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP']) ->create(); $table->insert($this->data); $table->save(); diff --git a/db/migrations/20230405185104_threads.php b/db/migrations/20230405185104_threads.php index 4d3a330..6406c38 100644 --- a/db/migrations/20230405185104_threads.php +++ b/db/migrations/20230405185104_threads.php @@ -20,7 +20,7 @@ final class Threads extends AbstractMigration ->addColumn('attempts', 'integer', ['default' => 0]) ->addColumn('attempts_limit', 'integer', ['default' => 1]) ->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP']) - ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null]) + ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP']) ->addColumn('class', 'string', ['limit' => 255, 'default' => null]) ->addColumn('method', 'string', ['limit' => 255, 'default' => null]) ->addColumn('params', 'text', ['default' => null]) diff --git a/db/migrations/20230405185109_threads_history.php b/db/migrations/20230405185109_threads_history.php index ae95ccc..95e978a 100644 --- a/db/migrations/20230405185109_threads_history.php +++ b/db/migrations/20230405185109_threads_history.php @@ -19,7 +19,7 @@ final class ThreadsHistory extends AbstractMigration ->addColumn('attempts', 'integer', ['default' => 0]) ->addColumn('attempts_limit', 'integer', ['default' => 1]) ->addColumn('date_created', 'datetime', ['default' => 'CURRENT_TIMESTAMP']) - ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null]) + ->addColumn('date_updated', 'datetime', ['null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP']) ->addColumn('class', 'string', ['limit' => 255, 'default' => null]) ->addColumn('method', 'string', ['limit' => 255, 'default' => null]) ->addColumn('params', 'text', ['default' => null]) diff --git a/templates/index.twig b/templates/index.twig index b0e524f..226f09b 100644 --- a/templates/index.twig +++ b/templates/index.twig @@ -51,10 +51,10 @@
{% if isAuthorized %} +

Добро пожаловать!

{{ userDataTable |raw }} {% else %}

Вы не авторизованы :(

- {% endif %}