Skip to content

Commit 1c14dea

Browse files
Merge branch 'develop' of https://github.corp.magento.com/magento2/magento2ce into MAGETWO-49914
2 parents 1cf64d3 + b7dbda1 commit 1c14dea

File tree

171 files changed

+3566
-1374
lines changed

Some content is hidden

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

171 files changed

+3566
-1374
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ atlassian*
4646

4747
/var/*
4848
!/var/.htaccess
49-
/vendor
49+
/vendor/*
5050
!/vendor/.htaccess

app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ public function render(\Magento\Framework\DataObject $row)
4141
{
4242
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' . $row->getUrl() . '">' . __(
4343
'Read Details'
44-
) . '</a>' : '';
44+
) . '</a> | ' : '';
4545

4646
$markAsReadHtml = !$row->getIsRead() ? '<a class="action-mark" href="' . $this->getUrl(
4747
'*/*/markAsRead/',
4848
['_current' => true, 'id' => $row->getId()]
4949
) . '">' . __(
5050
'Mark as Read'
51-
) . '</a>' : '';
51+
) . '</a> | ' : '';
5252

5353
$encodedUrl = $this->_urlHelper->getEncodedUrl();
5454
return sprintf(

app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
allowtransparency="true"
3030
frameborder="0"
3131
name="iframeTransparent"
32-
style="display:none;width:100%;background-color:transparent">
32+
class="payment-method-iframe">
3333

3434
</iframe>
3535
<form class="form" id="co-transparent-form" action="#" method="post" data-bind="mageInit: {

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
<script data-template="search-suggest" type="text/x-magento-template">
2929
<ul class="search-global-menu">
3030
<li class="item">
31-
<a href="<?php /* @escapeNotVerified */ echo $block->getURL('catalog/product/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Products</a>
31+
<a id="searchPreviewProducts" href="<?php /* @escapeNotVerified */ echo $block->getURL('catalog/product/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Products</a>
3232
</li>
3333
<li class="item">
34-
<a href="<?php /* @escapeNotVerified */ echo $block->getURL('sales/order/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Orders</a>
34+
<a id="searchPreviewOrders" href="<?php /* @escapeNotVerified */ echo $block->getURL('sales/order/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Orders</a>
3535
</li>
3636
<li class="item">
37-
<a href="<?php /* @escapeNotVerified */ echo $block->getURL('customer/index/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Customers</a>
37+
<a id="searchPreviewCustomers" href="<?php /* @escapeNotVerified */ echo $block->getURL('customer/index/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Customers</a>
3838
</li>
3939
<li class="item">
40-
<a href="<?php /* @escapeNotVerified */ echo $block->getURL('cms/page/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Pages</a>
40+
<a id="searchPreviewPages" href="<?php /* @escapeNotVerified */ echo $block->getURL('cms/page/index/'); ?>?search=<%- data.term%>" class="title">"<%- data.term%>" in Pages</a>
4141
</li>
4242
<% if (data.items.length) { %>
4343
<% _.each(data.items, function(value){ %>

app/code/Magento/Backup/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function getExtensions()
122122
\Magento\Framework\Backup\Factory::TYPE_SYSTEM_SNAPSHOT => 'tgz',
123123
\Magento\Framework\Backup\Factory::TYPE_SNAPSHOT_WITHOUT_MEDIA => 'tgz',
124124
\Magento\Framework\Backup\Factory::TYPE_MEDIA => 'tgz',
125-
\Magento\Framework\Backup\Factory::TYPE_DB => 'gz'
125+
\Magento\Framework\Backup\Factory::TYPE_DB => 'sql'
126126
];
127127
}
128128

app/code/Magento/BraintreeTwo/Block/Paypal/Button.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\BraintreeTwo\Model\Ui\ConfigProvider;
1313
use Magento\Framework\View\Element\Template\Context;
1414
use Magento\BraintreeTwo\Gateway\Config\PayPal\Config;
15+
use Magento\Payment\Model\MethodInterface;
1516

1617
/**
1718
* Class Button
@@ -42,6 +43,11 @@ class Button extends Template implements ShortcutInterface
4243
*/
4344
private $configProvider;
4445

46+
/**
47+
* @var MethodInterface
48+
*/
49+
private $payment;
50+
4551
/**
4652
* Constructor
4753
*
@@ -50,6 +56,7 @@ class Button extends Template implements ShortcutInterface
5056
* @param Session $checkoutSession
5157
* @param Config $config
5258
* @param ConfigProvider $configProvider
59+
* @param MethodInterface $payment
5360
* @param array $data
5461
*/
5562
public function __construct(
@@ -58,6 +65,7 @@ public function __construct(
5865
Session $checkoutSession,
5966
Config $config,
6067
ConfigProvider $configProvider,
68+
MethodInterface $payment,
6169
array $data = []
6270
) {
6371
parent::__construct($context, $data);
@@ -66,6 +74,7 @@ public function __construct(
6674
$this->checkoutSession = $checkoutSession;
6775
$this->config = $config;
6876
$this->configProvider = $configProvider;
77+
$this->payment = $payment;
6978
}
7079

7180
/**
@@ -125,7 +134,8 @@ public function getAmount()
125134
*/
126135
public function isActive()
127136
{
128-
return $this->config->isActive() && $this->config->isDisplayShoppingCart();
137+
return $this->payment->isAvailable($this->checkoutSession->getQuote()) &&
138+
$this->config->isDisplayShoppingCart();
129139
}
130140

131141
/**

app/code/Magento/BraintreeTwo/etc/frontend/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<item name="alias" xsi:type="string">braintree.paypal.mini-cart</item>
5050
<item name="button_id" xsi:type="string">braintree-paypal-mini-cart</item>
5151
</argument>
52+
<argument name="payment" xsi:type="object">BraintreeTwoPayPalFacade</argument>
5253
</arguments>
5354
</type>
5455
</config>

app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private function processPaymentConfiguration(array &$configuration, array $eleme
173173
'telephone' => [
174174
'config' => [
175175
'tooltip' => [
176-
'description' => 'For delivery questions.',
176+
'description' => __('For delivery questions.'),
177177
],
178178
],
179179
],

app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ require([
2929
"jquery/jquery.hashchange",
3030
"mage/mage",
3131
"prototype",
32+
"mage/adminhtml/form",
3233
"domReady!"
3334
], function(jQuery, registry){
3435

app/code/Magento/Developer/Console/Command/SourceThemeDeployCommand.php

Lines changed: 56 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -87,47 +87,49 @@ protected function configure()
8787
{
8888
parent::configure();
8989
$this->setDescription('Collects and publishes source files for theme.')
90-
->setDefinition([
91-
new InputArgument(
92-
self::FILE_ARGUMENT,
93-
InputArgument::IS_ARRAY,
94-
'Files to pre-process (file should be specified without extension)',
95-
['css/styles-m', 'css/styles-l']
96-
),
97-
new InputOption(
98-
self::TYPE_ARGUMENT,
99-
null,
100-
InputOption::VALUE_REQUIRED,
101-
'Type of source files: [less]',
102-
'less'
103-
),
104-
new InputOption(
105-
self::LOCALE_OPTION,
106-
null,
107-
InputOption::VALUE_REQUIRED,
108-
'Locale: [en_US]',
109-
'en_US'
110-
),
111-
new InputOption(
112-
self::AREA_OPTION,
113-
null,
114-
InputOption::VALUE_REQUIRED,
115-
'Area: [frontend|adminhtml]',
116-
'frontend'
117-
),
118-
new InputOption(
119-
self::THEME_OPTION,
120-
null,
121-
InputOption::VALUE_REQUIRED,
122-
'Theme: [Vendor/theme]',
123-
'Magento/luma'
124-
),
125-
126-
]);
90+
->setDefinition(
91+
[
92+
new InputArgument(
93+
self::FILE_ARGUMENT,
94+
InputArgument::IS_ARRAY,
95+
'Files to pre-process (file should be specified without extension)',
96+
['css/styles-m', 'css/styles-l']
97+
),
98+
new InputOption(
99+
self::TYPE_ARGUMENT,
100+
null,
101+
InputOption::VALUE_REQUIRED,
102+
'Type of source files: [less]',
103+
'less'
104+
),
105+
new InputOption(
106+
self::LOCALE_OPTION,
107+
null,
108+
InputOption::VALUE_REQUIRED,
109+
'Locale: [en_US]',
110+
'en_US'
111+
),
112+
new InputOption(
113+
self::AREA_OPTION,
114+
null,
115+
InputOption::VALUE_REQUIRED,
116+
'Area: [frontend|adminhtml]',
117+
'frontend'
118+
),
119+
new InputOption(
120+
self::THEME_OPTION,
121+
null,
122+
InputOption::VALUE_REQUIRED,
123+
'Theme: [Vendor/theme]',
124+
'Magento/luma'
125+
),
126+
127+
]
128+
);
127129
}
128130

129131
/**
130-
* @inheritdoc
132+
* {@inheritdoc}
131133
* @throws \InvalidArgumentException
132134
*/
133135
protected function execute(InputInterface $input, OutputInterface $output)
@@ -144,6 +146,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
144146
$locale . ' argument has invalid value, please run info:language:list for list of available locales'
145147
);
146148
}
149+
150+
if (!preg_match('#^[\w\-]+\/[\w\-]+$#', $theme)) {
151+
throw new \InvalidArgumentException(
152+
'Value "' . $theme . '" of the option "' . self::THEME_OPTION .
153+
'" has invalid format. The format should be "Vendor/theme".'
154+
);
155+
}
156+
147157
$message = sprintf(
148158
'<info>Processed Area: %s, Locale: %s, Theme: %s, File type: %s.</info>',
149159
$area,
@@ -164,7 +174,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
164174
]
165175
);
166176

167-
$this->assetPublisher->publish($asset);
177+
try {
178+
$this->assetPublisher->publish($asset);
179+
} catch (\Magento\Framework\View\Asset\File\NotFoundException $e) {
180+
throw new \InvalidArgumentException(
181+
'Verify entered values of the argument and options. ' . $e->getMessage()
182+
);
183+
}
184+
168185
$output->writeln('<comment>-> ' . $asset->getFilePath() . '</comment>');
169186
}
170187

0 commit comments

Comments
 (0)