Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainlinec/develop' into pullr
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Korablov committed Nov 2, 2015
2 parents adeab43 + f578e54 commit 4e6eb59
Show file tree
Hide file tree
Showing 333 changed files with 6,041 additions and 2,955 deletions.
7 changes: 7 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@

</IfModule>

############################################
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
## Please, set it on virtual host configuration level

## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
############################################

<IfModule mod_rewrite.c>

############################################
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/view/adminhtml/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
</container>
</container>
</referenceContainer>
<referenceContainer name="backend.page">
<block class="Magento\Framework\View\Element\Template" name="page.loader" template="Magento_Backend::admin/loader.phtml" after="-"/>
</referenceContainer>
<referenceContainer name="after.body.start">
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
<block class="Magento\Translation\Block\Html\Head\Config" name="translate-config"/>
Expand Down
240 changes: 104 additions & 136 deletions app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Large diffs are not rendered by default.

61 changes: 0 additions & 61 deletions app/code/Magento/Braintree/Controller/PayPal/GetButtonData.php

This file was deleted.

6 changes: 3 additions & 3 deletions app/code/Magento/Braintree/Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

class ConfigProvider extends CcGenericConfigProvider
{

/**
* @var string[]
*/
Expand Down Expand Up @@ -97,8 +98,7 @@ public function getStoredCards()
*/
protected function getCcAvailableCcTypes()
{
$country = $this->checkoutSession->getQuote()->getBillingAddress()->getCountryId();
return $this->dataHelper->getCcAvailableCardTypes($country);
return $this->dataHelper->getCcAvailableCardTypes();
}

/**
Expand Down Expand Up @@ -185,7 +185,7 @@ public function getConfig()
'isCcDetectionEnabled' => $this->config->isCcDetectionEnabled(),
'availableCardTypes' => $this->getCcAvailableCcTypes(),
'braintreeDataJs'=> $this->config->getBraintreeDataJs(),
'ajaxGenerateNonceUrl' => $this->getAjaxGenerateNonceUrl(),
'ajaxGenerateNonceUrl' => $this->getAjaxGenerateNonceUrl()
],
],
]);
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Braintree/Model/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,8 @@ protected function processSuccessResult(
*/
public function canVoid()
{
if (($order = $this->_registry->registry('current_order'))
&& $order->getId() && $order->hasInvoices() ) {
if ((($order = $this->_registry->registry('current_order'))
&& $order->getId() && $order->hasInvoices()) || $this->_registry->registry('current_invoice')) {
return false;
}
return $this->_canVoid;
Expand Down
7 changes: 5 additions & 2 deletions app/code/Magento/Braintree/Observer/AddPaypalShortcuts.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ public function __construct(
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
$isMiniCart = !$observer->getEvent()->getIsCatalogProduct();

//Don't display shortcut on product view page
if (!$this->methodPayPal->isActive() ||
!$this->paypalConfig->isShortcutCheckoutEnabled()) {
!$this->paypalConfig->isShortcutCheckoutEnabled() ||
!$isMiniCart) {
return;
}

Expand All @@ -57,7 +60,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
'',
[
'data' => [
Shortcut::MINI_CART_FLAG_KEY => !$observer->getEvent()->getIsCatalogProduct()
Shortcut::MINI_CART_FLAG_KEY => $isMiniCart
]
]
);
Expand Down

This file was deleted.

19 changes: 5 additions & 14 deletions app/code/Magento/Braintree/Test/Unit/Model/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace Magento\Braintree\Test\Unit\Model;

use Magento\Braintree\Model\ConfigProvider;
use Magento\Braintree\Model\PaymentMethod;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;

Expand Down Expand Up @@ -193,16 +194,6 @@ public function testGetConfig(
->method('generatePaymentMethodToken')
->willReturnMap($tokenNonceMap);

$quoteMock = $this->getMockBuilder('\Magento\Quote\Model\Quote')
->disableOriginalConstructor()
->getMock();
$quoteMock->expects($this->once())
->method('getBillingAddress')
->willReturn(new \Magento\Framework\DataObject(['country_id' => 'US']));
$this->checkoutSessionMock->expects($this->once())
->method('getQuote')
->willReturn($quoteMock);

$cardTypeMap = [
['Visa', 'VI'],
['Master Card', 'MA'],
Expand Down Expand Up @@ -272,7 +263,7 @@ public function getConfigDataProvider()
'isCcDetectionEnabled' => true,
'availableCardTypes' => $this->availableCardTypes,
'braintreeDataJs'=> 'https://js.braintreegateway.com/v1/braintree-data.js',
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL,
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL
],
],
]
Expand Down Expand Up @@ -347,7 +338,7 @@ public function getConfigDataProvider()
'isCcDetectionEnabled' => true,
'availableCardTypes' => $this->availableCardTypes,
'braintreeDataJs'=> 'https://js.braintreegateway.com/v1/braintree-data.js',
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL,
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL
],
],
]
Expand Down Expand Up @@ -422,7 +413,7 @@ public function getConfigDataProvider()
'isCcDetectionEnabled' => true,
'availableCardTypes' => $this->availableCardTypes,
'braintreeDataJs'=> 'https://js.braintreegateway.com/v1/braintree-data.js',
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL,
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL
],
],
]
Expand Down Expand Up @@ -466,7 +457,7 @@ public function getConfigDataProvider()
'isCcDetectionEnabled' => true,
'availableCardTypes' => $this->availableCardTypes,
'braintreeDataJs'=> 'https://js.braintreegateway.com/v1/braintree-data.js',
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL,
'ajaxGenerateNonceUrl' => self::PAYMENT_NONCE_GENERATION_URL
],
],
]
Expand Down
Loading

0 comments on commit 4e6eb59

Please sign in to comment.