8000 Fix _APP_EXECUTOR_HOST for upgrades by stnguyen90 · Pull Request #6141 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix _APP_EXECUTOR_HOST for upgrades #6141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/config/variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@
'introduction' => '0.13.0',
'default' => 'http://appwrite-executor/v1',
'required' => false,
'overwrite' => true,
'question' => '',
'filter' => ''
],
Expand Down
19 changes: 10 additions & 9 deletions src/Appwrite/Platform/Tasks/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function action(string $httpPort, string $httpsPort, string $organization
$config = Config::getParam('variables');
$defaultHTTPPort = '80';
$defaultHTTPSPort = '443';
/** @var array<string, array<string, string>> $vars array whre key is variable name and value is variable */
$vars = [];

/**
Expand All @@ -50,7 +51,7 @@ public function action(string $httpPort, string $httpsPort, string $organization

foreach ($config as $category) {
foreach ($category['variables'] ?? [] as $var) {
$vars[] = $var;
$vars[$var['name']] = $var;
}
}

Expand Down Expand Up @@ -104,10 +105,10 @@ public function action(string $httpPort, string $httpsPort, string $organization
if (is_null($value)) {
continue;
}
foreach ($vars as $i => $var) {
if ($var['name'] === $key) {
$vars[$i]['default'] = $value;
}

$configVar = $vars[$key] ?? [];
if (!empty($configVar) && !($configVar['overwrite'] ?? false)) {
$vars[$key]['default'] = $value;
}
}
}
Expand All @@ -123,10 +124,10 @@ public function action(string $httpPort, string $httpsPort, string $organization
if (is_null($value)) {
continue;
}
foreach ($vars as $i => $var) {
if ($var['name'] === $key) {
$vars[$i]['default'] = $value;
}

$configVar = $vars[$key] ?? [];
if (!empty($configVar) && !($configVar['overwrite'] ?? false)) {
$vars[$key]['default'] = $value;
}
}
}
Expand Down
0