Skip to content

Commit

Permalink
Merge pull request #62 from Hlavtox/remove-ajaxdie
Browse files Browse the repository at this point in the history
Remove usage of ajaxDie
  • Loading branch information
Hlavtox authored Feb 20, 2024
2 parents a93403a + fa5e617 commit 744317d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controllers/admin/AdminPsThemeCustoConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,13 @@ public function ajaxProcessUpdateModule()
'moduleActionsNames' => $this->moduleActionsNames,
]);

$this->ajaxDie($this->context->smarty->fetch(__DIR__ . '/../../views/templates/admin/controllers/' . $this->controller_quick_name . '/elem/module_actions.tpl'));
$tplPath = $this->context->smarty->fetch(__DIR__ . '/../../views/templates/admin/controllers/' . $this->controller_quick_name . '/elem/module_actions.tpl');
if (version_compare(_PS_VERSION_, '1.7.5', '>=')) {
$this->ajaxRender($tplPath);
exit;
} else {
$this->ajaxDie($tplPath);
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.1.2.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Call to static method getInstance\(\) on an unknown class PrestaShop\\PrestaShop\\Adapter\\SymfonyContainer.#'
- '#Call to an undefined method AdminPsThemeCustoConfigurationController::ajaxRender\(\).#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.2.5.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Call to static method getInstance\(\) on an unknown class PrestaShop\\PrestaShop\\Adapter\\SymfonyContainer.#'
- '#Call to an undefined method AdminPsThemeCustoConfigurationController::ajaxRender\(\).#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.3.4.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes:
parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Call to an undefined method AdminPsThemeCustoConfigurationController::ajaxRender\(\).#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.4.4.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes:
parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Call to an undefined method AdminPsThemeCustoConfigurationController::ajaxRender\(\).#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.5.1.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes:
parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.6.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes:
parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.7.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ includes:
parameters:
ignoreErrors:
- '#Access to an undefined property Cookie::\$profile.#'
- '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#'

0 comments on commit 744317d

Please sign in to comment.