aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/layout.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2019-11-15 15:57:46 +0100
committern-peugnet <n.peugnet@free.fr>2019-11-15 15:57:46 +0100
commitc1843c0a2ef49de3d2030398f5c14549cc1791ab (patch)
tree22fd633cc2f19df053d1e7e2bb8e4a5d134890c8 /app/view/templates/layout.php
parente4bc65433283e0725a2e7bf07ae0c84f7905af17 (diff)
downloadwcms-c1843c0a2ef49de3d2030398f5c14549cc1791ab.tar.gz
wcms-c1843c0a2ef49de3d2030398f5c14549cc1791ab.zip
feat: load Sentry browser as an external script
- better way to check if we need to report errors in PHP - fix make file $(js_bundles) dependencies (add webpack conf) - update sentry-browser sdk and move it to dev requirements
Diffstat (limited to 'app/view/templates/layout.php')
-rw-r--r--app/view/templates/layout.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/view/templates/layout.php b/app/view/templates/layout.php
index ef28748..9259fda 100644
--- a/app/view/templates/layout.php
+++ b/app/view/templates/layout.php
@@ -17,7 +17,7 @@
if (!empty(Wcms\Config::interfacecss())) {
echo '<link rel="stylesheet" href="' . Wcms\Model::csspath() . Wcms\Config::interfacecss() . '">';
}
- if (!empty(Wcms\Config::sentrydsn())) {
+ if (isreportingerrors()) {
?>
<script>
const sentrydsn = '<?= Wcms\Config::sentrydsn() ?>';
@@ -25,6 +25,7 @@
const url = '<?= Wcms\Config::url() ?>';
const basepath = '<?= Wcms\Config::basepath() ?>';
</script>
+ <script src="https://browser.sentry-cdn.com/5.9.0/bundle.min.js"></script>
<script src="<?= Wcms\Model::jspath() ?>sentry.bundle.js"></script>
<?php } ?>
</head>