Minor changes.

This commit is contained in:
Lars Jung 2015-05-20 22:44:08 +02:00
parent 65d8aab429
commit efc4623a0b
2 changed files with 7 additions and 3 deletions

View file

@ -78,7 +78,7 @@ class Context {
public function is_info_request() { 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) { public function to_href($path, $trailing_slash = true) {
@ -147,7 +147,11 @@ class Context {
return false; 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; return false;
} }

View file

@ -9,7 +9,7 @@ describe('view', function () {
this.storeKey = '_h5ai'; this.storeKey = '_h5ai';
this.xConfig = { this.xConfig = {
setup: { setup: {
H5AI_HREF: util.uniqPath('-H5AI/'), PUBLIC_HREF: util.uniqPath('-PUBLIC/'),
ROOT_HREF: util.uniqPath('-ROOT/') ROOT_HREF: util.uniqPath('-ROOT/')
} }
}; };