mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
update
This commit is contained in:
parent
6c3e9cf4cc
commit
9119906f2a
1 changed files with 57 additions and 27 deletions
|
@ -56,6 +56,18 @@ class DomainIsCreatedListener
|
|||
$createdDatabaseHost = null;
|
||||
$createdDatabasePort = null;
|
||||
|
||||
$databseType = 'sqlite';
|
||||
$databasesAreCreated = false;
|
||||
$shouldCreateMysqlDatabase = false;
|
||||
|
||||
|
||||
$microweberSettingsFromPanel = setting('microweber');
|
||||
|
||||
if (isset($microweberSettingsFromPanel['database_driver']) && $microweberSettingsFromPanel['database_driver'] == 'mysql') {
|
||||
$shouldCreateMysqlDatabase = true;
|
||||
}
|
||||
|
||||
if($shouldCreateMysqlDatabase) {
|
||||
try {
|
||||
|
||||
$databaseUserPassword = Str::password(24);
|
||||
|
@ -79,9 +91,22 @@ class DomainIsCreatedListener
|
|||
} catch (\Exception $e) {
|
||||
$databasesAreCreated = false;
|
||||
}
|
||||
|
||||
}
|
||||
$installationType = 'symlink';
|
||||
$installationLanguage = 'bg';
|
||||
$installationLanguage = 'en';
|
||||
$website_manager_url = 'https://microweber.com';
|
||||
|
||||
//$installationTemplate = 'default';
|
||||
|
||||
|
||||
if (isset($microweberSettingsFromPanel['default_installation_type']) && $microweberSettingsFromPanel['default_installation_type'] == 'standalone') {
|
||||
$installationType = 'standalone';
|
||||
}
|
||||
if (isset($microweberSettingsFromPanel['website_manager_url']) && $microweberSettingsFromPanel['website_manager_url']) {
|
||||
$website_manager_url = $microweberSettingsFromPanel['website_manager_url'];
|
||||
}
|
||||
|
||||
// dd(setting('microweber'));
|
||||
|
||||
$install = new \MicroweberPackages\SharedServerScripts\MicroweberInstaller();
|
||||
$install->setChownUser($findDomain->domain_username);
|
||||
|
@ -93,7 +118,12 @@ class DomainIsCreatedListener
|
|||
$install->setLanguage($installationLanguage);
|
||||
|
||||
//$install->setStandaloneInstallation();
|
||||
if($installationType == 'symlink') {
|
||||
$install->setSymlinkInstallation();
|
||||
} else {
|
||||
$install->setStandaloneInstallation();
|
||||
}
|
||||
|
||||
|
||||
if ($databasesAreCreated) {
|
||||
$install->setDatabaseDriver('mysql');
|
||||
|
@ -114,7 +144,7 @@ class DomainIsCreatedListener
|
|||
if (isset($status['success']) && $status['success']) {
|
||||
|
||||
$whiteLabelSettings = [];
|
||||
$whiteLabelSettings['website_manager_url'] = 'https://microweber.com';
|
||||
$whiteLabelSettings['website_manager_url'] = $website_manager_url;
|
||||
|
||||
$whitelabel = new MicroweberWhitelabelSettingsUpdater();
|
||||
$whitelabel->setPath($findDomain->domain_public);
|
||||
|
|
Loading…
Reference in a new issue