mirror of
https://github.com/openvk/chandler.git
synced 2025-01-22 15:24:15 +03:00
Fix scope pollution during presenter invocation
This commit is contained in:
parent
77ed640115
commit
b2b57fd439
1 changed files with 4 additions and 2 deletions
|
@ -154,6 +154,7 @@ class Router
|
||||||
$tpl = CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates/$presenterName/$action.xml";
|
$tpl = CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates/$presenterName/$action.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if(str_contains($presenterName, "Poll")) return json_encode($this->scope);
|
||||||
$output = $this->delegateView($tpl, $presenter);
|
$output = $this->delegateView($tpl, $presenter);
|
||||||
|
|
||||||
$presenter->onAfterRender();
|
$presenter->onAfterRender();
|
||||||
|
@ -275,6 +276,7 @@ class Router
|
||||||
|
|
||||||
function execute(string $url, ?string $parentModule = null): ?string
|
function execute(string $url, ?string $parentModule = null): ?string
|
||||||
{
|
{
|
||||||
|
$this->scope = [];
|
||||||
$this->url = chandler_escape_url(parse_url($url, PHP_URL_PATH));
|
$this->url = chandler_escape_url(parse_url($url, PHP_URL_PATH));
|
||||||
|
|
||||||
if(!is_null($parentModule)) {
|
if(!is_null($parentModule)) {
|
||||||
|
|
Loading…
Reference in a new issue