[admin] filter improve & fix ad link

This commit is contained in:
xiaomlove
2022-03-04 16:16:56 +08:00
parent b9d5df232b
commit 0665770ca5
51 changed files with 218 additions and 71 deletions

View File

@@ -403,7 +403,7 @@ class Install
return NexusDB::insert('users', $insert);
}
public function createEnvFile($data)
public function createEnvFile($data, $scene = 'install')
{
$envExampleFile = ROOT_PATH . ".env.example";
$envExampleData = readEnvFile($envExampleFile);
@@ -424,6 +424,17 @@ class Install
$this->doLog("[CREATE ENV] key: $key, new value: $value from example.");
$newData[$key] = $value;
}
if ($scene == 'install') {
if ($key == 'APP_ENV') {
$newData[$key] = 'production';
}
if ($key == 'APP_DEBUG') {
$newData[$key] = 'false';
}
if ($key == 'LOG_LEVEL') {
$newData[$key] = 'info';
}
}
}
$this->doLog("[CREATE ENV] final newData: " . json_encode($newData));
unset($key, $value);