Skip to content

Commit 8d9a115

Browse files
committed
refactor: clean up KeymanHosts usage and make consistent
* Splits the server-side and client-side references to keyman sites so that docker-based PHP can reference host.docker.internal on development machines for cross-references. * Removes some links to legacy sites such as sentry.keyman.com. * TODO: update to `BOOTSTRAP_VERSION=v0.17` in build.sh before merge. Relates-to: keymanapp/shared-sites#53 Relates-to: keymanapp/keyman.com#545
1 parent cc17fac commit 8d9a115

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## START STANDARD SITE BUILD SCRIPT INCLUDE
33
readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
44
readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh"
5-
readonly BOOTSTRAP_VERSION=v0.11
5+
readonly BOOTSTRAP_VERSION=fix/keyman-hosts-for-server # v0.11
66
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
77
## END STANDARD SITE BUILD SCRIPT INCLUDE
88

tools/2020/DownloadsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function Instance() {
2323
}
2424

2525
protected function GetData($path) {
26-
return @file_get_contents(KeymanHosts::Instance()->downloads_keyman_com . "/api" . $path);
26+
return @file_get_contents(KeymanHosts::Instance()->SERVER_downloads_keyman_com . "/api" . $path);
2727
}
2828

2929
public function GetPlatformVersion($platform) {

tools/2020/SKeymanComApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function Instance() {
2323
}
2424

2525
protected function GetData($path) {
26-
return @file_get_contents(KeymanHosts::Instance()->s_keyman_com . "/api" . $path);
26+
return @file_get_contents(KeymanHosts::Instance()->SERVER_s_keyman_com . "/api" . $path);
2727
}
2828

2929
public function GetKmwVersion() {

tools/onlineupdate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private function BuildKeyboardsResponse($appVersion) {
130130

131131
private function BuildKeyboardResponse($id, $version, $appVersion) {
132132
$platform = $this->platform;
133-
$KeyboardDownload = @file_get_contents(KeymanHosts::Instance()->api_keyman_com."/keyboard/$id");
133+
$KeyboardDownload = @file_get_contents(KeymanHosts::Instance()->SERVER_api_keyman_com."/keyboard/$id");
134134
if($KeyboardDownload === FALSE) {
135135
// not found
136136
return FALSE;
@@ -188,7 +188,7 @@ private function BuildKeyboardResponse($id, $version, $appVersion) {
188188

189189
private function BuildKeyboardDownloadPath($id, $version) {
190190
// TODO: use DownloadsApi
191-
$data = @file_get_contents(KeymanHosts::Instance()->downloads_keyman_com . "/api/keyboard/$id");
191+
$data = @file_get_contents(KeymanHosts::Instance()->SERVER_downloads_keyman_com . "/api/keyboard/$id");
192192
if($data === FALSE) {
193193
return FALSE;
194194
}

0 commit comments

Comments
 (0)