From 1998aa4a821c5f40481f51a2d123be562563762a Mon Sep 17 00:00:00 2001 From: Egorka Date: Thu, 13 Sep 2018 23:40:18 +0300 Subject: [PATCH] Installer settings init --- setup.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setup.php b/setup.php index 13bf1fd..ca900b6 100644 --- a/setup.php +++ b/setup.php @@ -104,12 +104,11 @@ class Setup // install modules $this->activateSystemModules(); - // remove garbage modules - // todo - // install system permissions $this->addPermissions(); + // Add init settings (name, short_name, theme) + $this->initSettings(); // apache htaccess $this->apache(); @@ -246,6 +245,16 @@ class Setup echo Console::log($this->l('Admin account complete'), 'green') . PHP_EOL; } + private function initSettings() + { + shell_exec('php ' . __DIR__ . '/yii settings/set ru site name "Веб-сайт"'); + shell_exec('php ' . __DIR__ . '/yii settings/set en site name "Website"'); + shell_exec('php ' . __DIR__ . '/yii settings/set ru site short_name "ВС"'); + shell_exec('php ' . __DIR__ . '/yii settings/set en site short_name "WS"'); + shell_exec('php ' . __DIR__ . '/yii settings/set ru site theme "start"'); + shell_exec('php ' . __DIR__ . '/yii settings/set en site theme "start"'); + } + private function trueEmail($email) : bool { $email = filter_var($email, FILTER_VALIDATE_EMAIL);