Created
August 9, 2019 11:32
-
-
Save torunar/0d37f9b5d5f071aac53f31d86e79a181 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/backend/block_manager.post.php b/app/controllers/backend/block_manager.post.php | |
index 21b0aaff0a..f26b6f4120 100644 | |
--- a/app/controllers/backend/block_manager.post.php | |
+++ b/app/controllers/backend/block_manager.post.php | |
@@ -355,6 +355,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
if (defined('AJAX_REQUEST')) { | |
/** @var \Tygh\Ajax $ajax */ | |
$ajax = Tygh::$app['ajax']; | |
+ if (isset($ajax->getAssignedVars()['result'])) { | |
+ $result = $ajax->getAssignedVars()['result']; | |
+ } | |
if ($result === true) { | |
$ajax->assign('status', 'OK'); | |
} elseif (is_numeric($result)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/common/block_manager.php b/app/controllers/common/block_manager.php | |
index 97c2f5c354..3f56984c18 100644 | |
--- a/app/controllers/common/block_manager.php | |
+++ b/app/controllers/common/block_manager.php | |
@@ -66,6 +66,14 @@ if ($request_method === 'POST') { | |
} | |
} | |
+ if (defined('AJAX_REQUEST')) { | |
+ /** @var \Tygh\Ajax $ajax */ | |
+ $ajax = Tygh::$app['ajax']; | |
+ if (isset($result)) { | |
+ $ajax->assign('result', $result); | |
+ } | |
+ } | |
+ | |
if (AREA === 'C') { | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment