From efc4623a0b32905ed7b43574474e6214308742fc Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Wed, 20 May 2015 22:44:08 +0200 Subject: [PATCH] Minor changes. --- src/_h5ai/private/php/core/class-context.php | 8 ++++++-- test/tests/integration/view.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/_h5ai/private/php/core/class-context.php b/src/_h5ai/private/php/core/class-context.php index 4a268ce7..a83216a6 100644 --- a/src/_h5ai/private/php/core/class-context.php +++ b/src/_h5ai/private/php/core/class-context.php @@ -78,7 +78,7 @@ class Context { public function is_info_request() { - return Util::starts_with($this->setup->get('REQUEST_HREF') . '/', $this->setup->get('H5AI_HREF')); + return Util::starts_with($this->setup->get('REQUEST_HREF') . '/', $this->setup->get('PUBLIC_HREF')); } public function to_href($path, $trailing_slash = true) { @@ -147,7 +147,11 @@ class Context { return false; } - if ($path === $this->setup->get('H5AI_PATH') || strpos($path, $this->setup->get('H5AI_PATH') . '/') === 0) { + if (strpos($path, $this->setup->get('PUBLIC_PATH')) === 0) { + return false; + } + + if (strpos($path, $this->setup->get('PRIVATE_PATH')) === 0) { return false; } diff --git a/test/tests/integration/view.js b/test/tests/integration/view.js index de79a32e..da16bdf2 100644 --- a/test/tests/integration/view.js +++ b/test/tests/integration/view.js @@ -9,7 +9,7 @@ describe('view', function () { this.storeKey = '_h5ai'; this.xConfig = { setup: { - H5AI_HREF: util.uniqPath('-H5AI/'), + PUBLIC_HREF: util.uniqPath('-PUBLIC/'), ROOT_HREF: util.uniqPath('-ROOT/') } };