Browse Source

Installer settings init

master
Egorka 6 years ago
parent
commit
1998aa4a82
  1. 15
      setup.php

15
setup.php

@ -104,12 +104,11 @@ class Setup
// install modules // install modules
$this->activateSystemModules(); $this->activateSystemModules();
// remove garbage modules
// todo
// install system permissions // install system permissions
$this->addPermissions(); $this->addPermissions();
// Add init settings (name, short_name, theme)
$this->initSettings();
// apache htaccess // apache htaccess
$this->apache(); $this->apache();
@ -246,6 +245,16 @@ class Setup
echo Console::log($this->l('Admin account complete'), 'green') . PHP_EOL; 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 private function trueEmail($email) : bool
{ {
$email = filter_var($email, FILTER_VALIDATE_EMAIL); $email = filter_var($email, FILTER_VALIDATE_EMAIL);

Loading…
Cancel
Save