Skip to content

Commit 54baca5

Browse files
author
Tang, Yu(ytang1)
committed
Merge pull request #57 from magento-api/MAGETWO-39663-NEW-Product-Save-Through-API-Service-Is-Not-Visible-On-Frontend
[API+FearlessKiwis+Vanilla] MAGETWO-39663 Product save through API, MAGETWO-44491 revert executeInternal to execute, Frontend Bug Fixes
2 parents 2fc9834 + 7e17cc9 commit 54baca5

File tree

1,190 files changed

+2361
-2032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,190 files changed

+2361
-2032
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/AjaxMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1313
*
1414
* @return void
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
if (!$this->getRequest()->getPostValue()) {
1919
return;

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1111
/**
1212
* @return void
1313
*/
14-
public function executeInternal()
14+
public function execute()
1515
{
1616
$this->_view->loadLayout();
1717
$this->_setActiveMenu(

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function executeInternal()
14+
public function execute()
1515
{
1616
$notificationId = (int)$this->getRequest()->getParam('id');
1717
if ($notificationId) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1111
/**
1212
* @return void
1313
*/
14-
public function executeInternal()
14+
public function execute()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function executeInternal()
14+
public function execute()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Remove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notificatio
1111
/**
1212
* @return void
1313
*/
14-
public function executeInternal()
14+
public function execute()
1515
{
1616
if ($id = $this->getRequest()->getParam('id')) {
1717
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
/**
3939
* @return void
4040
*/
41-
public function executeInternal()
41+
public function execute()
4242
{
4343
$severity = $this->getRequest()->getParam('severity');
4444
if ($severity) {

app/code/Magento/AdvancedPricingImportExport/Controller/Adminhtml/Export/GetFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GetFilter extends ExportController
1717
*
1818
* @return \Magento\Framework\Controller\ResultInterface
1919
*/
20-
public function executeInternal()
20+
public function execute()
2121
{
2222
$data = $this->getRequest()->getParams();
2323
if ($this->getRequest()->isXmlHttpRequest() && $data) {

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Place.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5252
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
5353
*/
54-
public function executeInternal()
54+
public function execute()
5555
{
5656
$paymentParam = $this->getRequest()->getParam('payment');
5757
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function _returnQuote($cancelOrder, $errorMsg)
9090
*
9191
* @return \Magento\Framework\View\Result\Layout
9292
*/
93-
public function executeInternal()
93+
public function execute()
9494
{
9595
$redirectParams = $this->getRequest()->getParams();
9696
$params = [];

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/ReturnQuote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function _returnQuote()
3131
*
3232
* @return void
3333
*/
34-
public function executeInternal()
34+
public function execute()
3535
{
3636
$this->_returnQuote();
3737
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Paymen
1414
*
1515
* @return void
1616
*/
17-
public function executeInternal()
17+
public function execute()
1818
{
1919
$this->_responseAction('adminhtml');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
*
7272
* @return string
7373
*/
74-
public function executeInternal()
74+
public function execute()
7575
{
7676
$paymentParam = $this->getRequest()->getParam('payment');
7777
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Redirect extends \Magento\Authorizenet\Controller\Directpost\Payment
1515
*
1616
* @return void
1717
*/
18-
public function executeInternal()
18+
public function execute()
1919
{
2020
$helper = $this->dataFactory->create('frontend');
2121

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
1414
*
1515
* @return void
1616
*/
17-
public function executeInternal()
17+
public function execute()
1818
{
1919
$this->_responseAction('frontend');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/ReturnQuote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReturnQuote extends \Magento\Authorizenet\Controller\Directpost\Payment
1313
*
1414
* @return void
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
$this->_returnCustomerQuote();
1919
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Test/Unit/Controller/Adminhtml/Authorizenet/Directpost/Payment/RedirectTest.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
9696
*/
9797
protected $helperMock;
9898

99-
/**
100-
* @var Redirect|\PHPUnit_Framework_MockObject_MockObject
101-
*/
102-
protected $controller;
103-
10499
protected function setUp()
105100
{
106101
$this->directpostSessionMock = $this->getMockBuilder('Magento\Authorizenet\Model\Directpost\Session')
@@ -201,7 +196,7 @@ protected function setUp()
201196
);
202197
}
203198

204-
public function testExecuteInternalErrorMsgWithoutCancelOrder()
199+
public function testExecuteErrorMsgWithoutCancelOrder()
205200
{
206201
$params = ['success' => 0, 'error_msg' => 'Error message'];
207202
$incrementId = 1;
@@ -243,10 +238,10 @@ public function testExecuteInternalErrorMsgWithoutCancelOrder()
243238
->method('register')
244239
->with(Iframe::REGISTRY_KEY);
245240

246-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
241+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
247242
}
248243

249-
public function testExecuteInternalErrorMsgWithCancelOrder()
244+
public function testExecuteErrorMsgWithCancelOrder()
250245
{
251246
$params = ['success' => 0, 'error_msg' => 'Error message', 'x_invoice_num' => 1];
252247
$incrementId = 1;
@@ -278,10 +273,10 @@ public function testExecuteInternalErrorMsgWithCancelOrder()
278273
->method('register')
279274
->with(Iframe::REGISTRY_KEY);
280275

281-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
276+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
282277
}
283278

284-
public function testExecuteInternalSuccess()
279+
public function testExecuteSuccess()
285280
{
286281
$params = ['success' => 1, 'controller_action_name' => 'action', 'x_invoice_num' => 1];
287282
$this->requestMock->expects($this->once())
@@ -312,6 +307,6 @@ public function testExecuteInternalSuccess()
312307
->method('register')
313308
->with(Iframe::REGISTRY_KEY);
314309

315-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
310+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
316311
}
317312
}

app/code/Magento/Authorizenet/Test/Unit/Controller/Directpost/Payment/PlaceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function testExecute(
205205
->method('jsonEncode')
206206
->with($result);
207207

208-
$this->placeOrderController->executeInternal();
208+
$this->placeOrderController->execute();
209209
}
210210

211211
/**
@@ -243,7 +243,7 @@ public function testExecuteFailedPlaceOrder(
243243
->method('jsonEncode')
244244
->with($result);
245245

246-
$this->placeOrderController->executeInternal();
246+
$this->placeOrderController->execute();
247247
}
248248

249249
/**

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ private function _moveBlockToContainer(\Magento\Framework\View\Element\AbstractB
200200
* @param \Magento\Framework\App\RequestInterface $request
201201
* @return \Magento\Framework\App\ResponseInterface
202202
*/
203-
public function execute(\Magento\Framework\App\RequestInterface $request)
203+
public function dispatch(\Magento\Framework\App\RequestInterface $request)
204204
{
205205
if (!$this->_processUrlKeys()) {
206-
return parent::execute($request);
206+
return parent::dispatch($request);
207207
}
208208

209209
if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) {
@@ -223,7 +223,7 @@ public function execute(\Magento\Framework\App\RequestInterface $request)
223223

224224
$this->_processLocaleSettings();
225225

226-
return parent::execute($request);
226+
return parent::dispatch($request);
227227
}
228228

229229
/**

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function __construct(
101101
* @return mixed
102102
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
103103
*/
104-
public function aroundExecute(
104+
public function aroundDispatch(
105105
\Magento\Backend\App\AbstractAction $subject,
106106
\Closure $proceed,
107107
\Magento\Framework\App\RequestInterface $request

app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MassactionKey
1919
* @return mixed
2020
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2121
*/
22-
public function aroundExecute(
22+
public function aroundDispatch(
2323
\Magento\Backend\App\AbstractAction $subject,
2424
\Closure $proceed,
2525
\Magento\Framework\App\RequestInterface $request

app/code/Magento/Backend/Controller/Adminhtml/Ajax/Translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
*
4141
* @return \Magento\Framework\Controller\Result\Json
4242
*/
43-
public function executeInternal()
43+
public function execute()
4444
{
4545
$translate = (array)$this->getRequest()->getPost('translate');
4646

app/code/Magento/Backend/Controller/Adminhtml/Auth/DeniedIframe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function _getDeniedIframe()
4141
*
4242
* @return \Magento\Framework\Controller\Result\Raw
4343
*/
44-
public function executeInternal()
44+
public function execute()
4545
{
4646
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
4747
$resultRaw = $this->resultRawFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Auth/DeniedJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function _getDeniedJson()
4343
*
4444
* @return \Magento\Framework\Controller\Result\Json
4545
*/
46-
public function executeInternal()
46+
public function execute()
4747
{
4848
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
4949
$resultJson = $this->resultJsonFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
*
3333
* @return \Magento\Backend\Model\View\Result\Redirect
3434
*/
35-
public function executeInternal()
35+
public function execute()
3636
{
3737
if ($this->_auth->isLoggedIn()) {
3838
if ($this->_auth->getAuthStorage()->isFirstPageAfterLogin()) {

app/code/Magento/Backend/Controller/Adminhtml/Auth/Logout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Logout extends \Magento\Backend\Controller\Adminhtml\Auth
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
$this->_auth->logout();
1919
$this->messageManager->addSuccess(__('You have logged out.'));

app/code/Magento/Backend/Controller/Adminhtml/BackendApp/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
/**
4040
* @return \Magento\Framework\Controller\ResultInterface
4141
*/
42-
public function executeInternal()
42+
public function execute()
4343
{
4444
$resultRedirect = $this->resultRedirectFactory->create();
4545
if ($this->getRequest()->getParam('app')) {

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CleanImages extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function executeInternal()
19+
public function execute()
2020
{
2121
try {
2222
$this->_objectManager->create('Magento\Catalog\Model\Product\Image')->clearCache();

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CleanMedia extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function executeInternal()
19+
public function execute()
2020
{
2121
try {
2222
$this->_objectManager->get('Magento\Framework\View\Asset\MergeService')->cleanMergedJsCss();

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanStaticFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CleanStaticFiles extends \Magento\Backend\Controller\Adminhtml\Cache
1515
*
1616
* @return \Magento\Backend\Model\View\Result\Redirect
1717
*/
18-
public function executeInternal()
18+
public function execute()
1919
{
2020
$this->_objectManager->get('Magento\Framework\App\State\CleanupFiles')->clearMaterializedViewFiles();
2121
$this->_eventManager->dispatch('clean_static_files_cache_after');

app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushAll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FlushAll extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
$this->_eventManager->dispatch('adminhtml_cache_flush_all');
1919
/** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */

app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FlushSystem extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
/** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */
1919
foreach ($this->_cacheFrontendPool as $cacheFrontend) {

app/code/Magento/Backend/Controller/Adminhtml/Cache/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Page
1515
*/
16-
public function executeInternal()
16+
public function execute()
1717
{
1818
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
1919
$resultPage = $this->resultPageFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassDisable extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function executeInternal()
19+
public function execute()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassEnable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassEnable extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function executeInternal()
19+
public function execute()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassRefresh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassRefresh extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function executeInternal()
19+
public function execute()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

0 commit comments

Comments
 (0)