From 5acea4a67c7fc2a5264677e6c9f14da9e98615c2 Mon Sep 17 00:00:00 2001 From: Sergey Ivashchenko Date: Fri, 28 Aug 2015 17:22:38 +0300 Subject: [PATCH] MAGETWO-41590: PR Preparation and processing --- .../Ui/Component/Listing/Column/PageActionsTest.php | 4 ++-- .../Sales/Block/Adminhtml/Transactions/Detail.php | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php index 21c1d2ec4994e..fdc87499f58ae 100644 --- a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php +++ b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php @@ -50,8 +50,8 @@ public function testPrepareItemsByPageId() 'href' => 'test/url/delete', 'label' => __('Delete'), 'confirm' => [ - 'title' => __('Delete "${ $.$data.title }"'), - 'message' => __('Are you sure you wan\'t to delete a "${ $.$data.title }" record?') + 'title' => __('Delete ${ $.$data.title }'), + 'message' => __('Are you sure you wan\'t to delete a ${ $.$data.title } record?') ], ] ], diff --git a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php index 75578a01930a7..126f6e04bdd13 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Transactions/Detail.php @@ -79,10 +79,12 @@ protected function _construct() ['label' => __('Back'), 'onclick' => "setLocation('{$backUrl}')", 'class' => 'back'] ); - if ($this->_authorization->isAllowed( - 'Magento_Sales::transactions_fetch' - ) && $this->orderPaymentRepository->get($this->_txn->getPaymentId())->getMethodInstance()->canFetchTransactionInfo() - ) { + $fetchTransactionAllowed = $this->_authorization->isAllowed('Magento_Sales::transactions_fetch'); + $canFetchTransaction = $this->orderPaymentRepository->get($this->_txn->getPaymentId()) + ->getMethodInstance() + ->canFetchTransactionInfo(); + + if ($fetchTransactionAllowed && $canFetchTransaction) { $fetchUrl = $this->getUrl('sales/*/fetch', ['_current' => true]); $this->buttonList->add( 'fetch',