Skip to content

Commit 3812404

Browse files
authored
Merge pull request #1923 from keymanapp/chore/merge-master-to-staging-b18s3
chore: Merge master to staging for Sprint B18S3
2 parents f2cb0cc + 682459f commit 3812404

File tree

69 files changed

+895
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+895
-412
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ node_modules/
99
# Shared files are bootstrapped:
1010
resources/bootstrap.inc.sh
1111
resources/.bootstrap-version
12+
resources/.bootstrap-registry
1213
_common/
1314

1415
# State files
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Keyman\Site\com\keyman\help;
5+
6+
use Keyman\Site\Common\KeymanSentry;
7+
8+
require_once(__DIR__ . '/../../_common/KeymanSentry.php');
9+
10+
const SENTRY_DSN = 'https://fcc8fe39792f49f3a94ea831cad5c9d6@o1005580.ingest.sentry.io/5983515';
11+
12+
class HelpKeymanComSentry {
13+
static function init() {
14+
KeymanSentry::Init(SENTRY_DSN);
15+
}
16+
static function GetBrowserHTML() {
17+
return KeymanSentry::GetBrowserHTML(SENTRY_DSN);
18+
}
19+
}

_includes/includes/__kmwheader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function get_kmwbuild()
7272
return $kmwbuild;
7373
}
7474

75+
// TODO: rewrite this -- it's kinda outdated
7576
// In case of no match, the defaults:
7677
switch($maj_version) {
7778
case 11:
@@ -81,8 +82,7 @@ function get_kmwbuild()
8182
case 2:
8283
return "2.0.473";
8384
default:
84-
global $TestServer;
85-
if($TestServer) {
85+
if(KeymanHosts::Instance()->Tier() != KeymanHosts::TIER_PRODUCTION) {
8686
return false; // We should never get this except briefly while documenting a new major version.
8787
// Maybe we could get away with "$maj_version.0.1", but that wouldn't be as detectable of an error.
8888
} else {

_includes/includes/head.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
require_once __DIR__ . '/../autoload.php';
77
use Keyman\Site\Common\KeymanHosts;
8+
use Keyman\Site\com\keyman\help\HelpKeymanComSentry;
89

910
// Variables used to manage and trigger debugging tests.
1011
// Simply defining the variable below is enough to trigger debug mode.
@@ -45,21 +46,7 @@
4546
}
4647
?>
4748
<title><?php echo htmlentities($title); ?></title>
48-
<?php
49-
/* Our local CDN version is identical to this file:
50-
<script
51-
src="https://browser.sentry-cdn.com/5.28.0/bundle.min.js"
52-
integrity="sha384-1HcgUzJmxPL9dRnZD2wMIj5+xsJfHS+WR+pT2yJNEldbOr9ESTzgHMQOcsb2yyDl"
53-
crossorigin="anonymous"
54-
></script>*/
55-
?>
56-
<script src="<?= cdn('js/sentry.bundle.5.28.0.min.js'); ?>"></script>
57-
<script>
58-
Sentry.init({
59-
dsn: "https://fcc8fe39792f49f3a94ea831cad5c9d6@o1005580.ingest.sentry.io/5983515",
60-
environment: location.host.match(/\.local$/) ? 'development' : location.host.match(/(^|\.)keyman-staging\.com$/) ? 'staging' : 'production',
61-
});
62-
</script>
49+
<?= HelpKeymanComSentry::GetBrowserHTML() ?>
6350
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
6451
<link rel='shortcut icon' href="<?php echo $favicon; ?>">
6552
<?php if(!empty($canonicalLink)) echo " <link rel=\"canonical\" href=\"$canonicalLink\">\n"; ?>

_includes/includes/servervars.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
require_once($_SERVER['DOCUMENT_ROOT'].'/cdn/deploy/cdn.php');
2424
}
2525

26-
$keyman_com = \Keyman\Site\Common\KeymanHosts::Instance()->keyman_com;
26+
use Keyman\Site\Common\KeymanHosts;
27+
28+
$keyman_com = KeymanHosts::Instance()->keyman_com;
2729

2830
// $site_protocol is used only by util.php at this time.
2931
$site_protocol = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
30-
31-
$TestServer = false;
32-
3332
$site_tavultesoft = 'www.tavultesoft.com';
34-
$site_securetavultesoft = 'secure.tavultesoft.com';
35-
$downloadsDomain = "downloads.keyman.com";
3633

3734
function cdn($file) {
38-
global $cdn, $TestServer;
39-
$use_cdn = !$TestServer || (isset($_REQUEST['cdn']) && $_REQUEST['cdn'] == 'force');
35+
global $cdn;
36+
$use_cdn =
37+
KeymanHosts::Instance()->Tier() == KeymanHosts::TIER_PRODUCTION ||
38+
KeymanHosts::Instance()->Tier() == KeymanHosts::TIER_STAGING ||
39+
(isset($_REQUEST['cdn']) && $_REQUEST['cdn'] == 'force');
4040
if($use_cdn && $cdn && array_key_exists('/'.$file, $cdn)) {
4141
return "/cdn/deploy{$cdn['/'.$file]}";
4242
}

_includes/includes/template.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?php
22
require_once __DIR__ . '/../../vendor/autoload.php';
3-
require_once __DIR__ . '/../../_common/KeymanSentry.php';
3+
require_once __DIR__ . '/../2020/HelpKeymanComSentry.php';
44

5-
const SENTRY_DSN = 'https://fcc8fe39792f49f3a94ea831cad5c9d6@o1005580.ingest.sentry.io/5983515';
6-
\Keyman\Site\Common\KeymanSentry::init(SENTRY_DSN);
5+
\Keyman\Site\com\keyman\help\HelpKeymanComSentry::init();
76

87
require_once('includes/servervars.php');
98
require_once('index-content.php');

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
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.17
6-
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
5+
readonly BOOTSTRAP_VERSION=v0.20
6+
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -H "Cache-Control: no-cache" -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
77
## END STANDARD SITE BUILD SCRIPT INCLUDE
88

99
# TODO: these should probably all be moved to a common defines script too?

cdn/dev/js/bundle.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

cdn/dev/js/sentry.bundle.5.28.0.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: KM020B1: ERROR_ContextExCannotReferenceIf
3+
---
4+
5+
| | |
6+
|------------|---------- |
7+
| Message | The offset in context\(\) points to a non\-character if\(\) statement in the context |
8+
| Module | [kmc-kmn.KmnCompilerMessages](kmc-kmn.kmncompilermessages) |
9+
| Identifier | `ERROR_ContextExCannotReferenceIf` |
10+
11+

0 commit comments

Comments
 (0)