mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-06 01:31:14 -04:00
Minor changes.
This commit is contained in:
parent
65d8aab429
commit
efc4623a0b
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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/')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue