aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2018-02-03 20:16:21 +0100
committerThomas Lange <code@nerdmind.de>2018-02-03 20:16:21 +0100
commitca52e765e9dbd9407346b574cada9a93720e535d (patch)
tree20e750483738938e1d993b9f067c1c26aa8f8379 /include
parent7601f94af929f909c29da522d9a4b37cecad0a7c (diff)
downloadbigpipe-ca52e765e9dbd9407346b574cada9a93720e535d.tar.gz
bigpipe-ca52e765e9dbd9407346b574cada9a93720e535d.tar.xz
bigpipe-ca52e765e9dbd9407346b574cada9a93720e535d.zip
Move check if BigPipe should be disabled into the pagelets.php
This commit moves the if condition, which checks if the pipelining mode of BigPipe should be disabled, directly into the pagelets.php to reduce duplicate code within index.php and async.php.
Diffstat (limited to 'include')
-rw-r--r--include/pagelets.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/pagelets.php b/include/pagelets.php
index 412e530..62c3ed9 100644
--- a/include/pagelets.php
+++ b/include/pagelets.php
@@ -5,6 +5,19 @@
$DEBUGGING = TRUE;
#===============================================================================
+# Check if BigPipe should be disabled
+#===============================================================================
+if(isset($_GET['bigpipe']) AND $_GET['bigpipe'] === '0') {
+ # You can use this method to disable the pipeline for Googlebot or something
+ # else. If BigPipe is "disabled", then all pagelets will be rendered without
+ # being pipelined through the javascript library. The content of the pagelet
+ # will be present at the original position within the HTML response (and all
+ # external stylesheets and javascripts will be displayed as simple <link> or
+ # <script> elements within the HTML document).
+ BigPipe\BigPipe::enabled(FALSE);
+}
+
+#===============================================================================
# Namespace paths based on whether the debugging mode is enabled
#===============================================================================
$pagelet = ($DEBUGGING ? 'Debugging' : 'BigPipe').'\Pagelet';