Skip to content

Commit 2d05fbe

Browse files
Merge pull request #28 from hitesh-wagento/2.1-develop-PR-port-17877
[Backport] Resolved : Wishlist icon cut on Shopping cart page in mobile view magento#17851
2 parents 4fa3bbe + 9cc8481 commit 2d05fbe

File tree

415 files changed

+4004
-1805
lines changed

Some content is hidden

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

415 files changed

+4004
-1805
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ language: php
1111
php:
1212
- 5.6
1313
- 7.0
14+
- 7.1
1415
env:
1516
global:
1617
- COMPOSER_BIN_DIR=~/bin

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,7 @@ Tests:
23512351
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
23522352
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
23532353
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
2354-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
2354+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
23552355
* Service Contracts:
23562356
* Refactored usage of new API of the Customer module
23572357
* Implemented Service Contracts for the Sales module

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Magento is thankful for any contribution that can improve our code base, documen
8989

9090
<h2>Reporting security issues</h2>
9191

92-
To report security vulnerabilities in Magento software or web sites, please e-mail <a href="mailto:[email protected]">[email protected]</a>. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our <a href="https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc">encryption key</a> if it includes sensitive information. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
92+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
9393

9494
Stay up-to-date on the latest vulnerabilities and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
9595

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function execute()
3939
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
4040
}
4141
}
42-
$this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
42+
$this->_redirect('adminhtml/*/');
4343
}
4444
}

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-admin-notification",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-store": "100.1.*",
77
"magento/module-backend": "100.1.*",
88
"magento/module-media-storage": "100.1.*",

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ protected function saveAndReplaceAdvancedPrices()
380380
),
381381
'qty' => $rowData[self::COL_TIER_PRICE_QTY],
382382
'value' => $rowData[self::COL_TIER_PRICE],
383-
'website_id' => $this->getWebsiteId($rowData[self::COL_TIER_PRICE_WEBSITE])
383+
'website_id' => $this->getWebSiteId($rowData[self::COL_TIER_PRICE_WEBSITE])
384384
];
385385
}
386386
}

app/code/Magento/AdvancedPricingImportExport/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-advanced-pricing-import-export",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-catalog": "101.0.*",
77
"magento/module-catalog-inventory": "100.1.*",
88
"magento/module-eav": "100.1.*",

app/code/Magento/Authorization/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-authorization",
33
"description": "Authorization module provides access to Magento ACL functionality.",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-backend": "100.1.*",
77
"magento/framework": "100.1.*"
88
},

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,14 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
820820
{
821821
try {
822822
$response = $this->getResponse();
823-
if (
824-
$voidPayment && $response->getXTransId() && strtoupper($response->getXType())
825-
== self::REQUEST_TYPE_AUTH_ONLY
823+
if ($voidPayment
824+
&& $response->getXTransId()
825+
&& strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY
826826
) {
827-
$order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void();
827+
$order->getPayment()
828+
->setTransactionId(null)
829+
->setParentTransactionId($response->getXTransId())
830+
->void($response);
828831
}
829832
$order->registerCancellation($message)->save();
830833
} catch (\Exception $e) {

app/code/Magento/Authorizenet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-authorizenet",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-sales": "100.1.*",
77
"magento/module-store": "100.1.*",
88
"magento/module-quote": "100.1.*",

app/code/Magento/Backend/Block/Dashboard/Bar.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ public function getTotals()
3838
*/
3939
public function addTotal($label, $value, $isQuantity = false)
4040
{
41-
/*if (!$isQuantity) {
42-
$value = $this->format($value);
43-
$decimals = substr($value, -2);
44-
$value = substr($value, 0, -2);
45-
} else {
46-
$value = ($value != '')?$value:0;
47-
$decimals = '';
48-
}*/
4941
if (!$isQuantity) {
5042
$value = $this->format($value);
5143
}

app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function _prepareForm()
3737
['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]
3838
);
3939

40-
$this->_prepareStoreFieldSet($form);
40+
$this->_prepareStoreFieldset($form);
4141

4242
$form->addField(
4343
'store_type',

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Currency.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ public function __construct(
7070
$this->_storeManager = $storeManager;
7171
$this->_currencyLocator = $currencyLocator;
7272
$this->_localeCurrency = $localeCurrency;
73-
$defaultBaseCurrencyCode = $this->_scopeConfig->getValue(
74-
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE,
75-
'default'
76-
);
73+
$defaultBaseCurrencyCode = $currencyLocator->getDefaultCurrency($this->_request);
7774
$this->_defaultBaseCurrency = $currencyFactory->create()->load($defaultBaseCurrencyCode);
7875
}
7976

app/code/Magento/Backend/Block/Widget/Tabs.php

Lines changed: 95 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public function addTab($tabId, $tab)
114114
if (empty($tabId)) {
115115
throw new \Exception(__('Please correct the tab configuration and try again. Tab Id should be not empty'));
116116
}
117+
117118
if (is_array($tab)) {
118119
$this->_tabs[$tabId] = new \Magento\Framework\DataObject($tab);
119120
} elseif ($tab instanceof \Magento\Framework\DataObject) {
@@ -123,13 +124,15 @@ public function addTab($tabId, $tab)
123124
}
124125
} elseif (is_string($tab)) {
125126
$this->_addTabByName($tab, $tabId);
127+
126128
if (!$this->_tabs[$tabId] instanceof TabInterface) {
127129
unset($this->_tabs[$tabId]);
128130
return $this;
129131
}
130132
} else {
131133
throw new \Exception(__('Please correct the tab configuration and try again.'));
132134
}
135+
133136
if ($this->_tabs[$tabId]->getUrl() === null) {
134137
$this->_tabs[$tabId]->setUrl('#');
135138
}
@@ -140,10 +143,7 @@ public function addTab($tabId, $tab)
140143

141144
$this->_tabs[$tabId]->setId($tabId);
142145
$this->_tabs[$tabId]->setTabId($tabId);
143-
144-
if ($this->_activeTab === null) {
145-
$this->_activeTab = $tabId;
146-
}
146+
147147
if (true === $this->_tabs[$tabId]->getActive()) {
148148
$this->setActiveTab($tabId);
149149
}
@@ -232,33 +232,109 @@ protected function _setActiveTab($tabId)
232232
*/
233233
protected function _beforeToHtml()
234234
{
235+
$this->_tabs = $this->reorderTabs();
236+
235237
if ($activeTab = $this->getRequest()->getParam('active_tab')) {
236238
$this->setActiveTab($activeTab);
237239
} elseif ($activeTabId = $this->_authSession->getActiveTabId()) {
238240
$this->_setActiveTab($activeTabId);
239241
}
240242

241-
$_new = [];
243+
if ($this->_activeTab === null && !empty($this->_tabs)) {
244+
/** @var TabInterface $tab */
245+
$tab = reset($this->_tabs);
246+
$this->_activeTab = $tab->getId();
247+
}
248+
249+
$this->assign('tabs', $this->_tabs);
250+
return parent::_beforeToHtml();
251+
}
252+
253+
/**
254+
* Reorder the tabs.
255+
*
256+
* @return array
257+
*/
258+
private function reorderTabs()
259+
{
260+
$orderByIdentity = [];
261+
$orderByPosition = [];
262+
$position = 100;
263+
264+
/**
265+
* Set the initial positions for each tab.
266+
*
267+
* @var string $key
268+
* @var TabInterface $tab
269+
*/
242270
foreach ($this->_tabs as $key => $tab) {
243-
foreach ($this->_tabs as $k => $t) {
244-
if ($t->getAfter() == $key) {
245-
$_new[$key] = $tab;
246-
$_new[$k] = $t;
247-
} else {
248-
if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($this->_tabs))) {
249-
$_new[$key] = $tab;
250-
}
251-
}
252-
}
271+
$tab->setPosition($position);
272+
273+
$orderByIdentity[$key] = $tab;
274+
$orderByPosition[$position] = $tab;
275+
276+
$position += 100;
253277
}
254278

255-
$this->_tabs = $_new;
256-
unset($_new);
279+
return $this->applyTabsCorrectOrder($orderByPosition, $orderByIdentity);
280+
}
281+
282+
/**
283+
* @param array $orderByPosition
284+
* @param array $orderByIdentity
285+
*
286+
* @return array
287+
*/
288+
private function applyTabsCorrectOrder(array $orderByPosition, array $orderByIdentity)
289+
{
290+
$positionFactor = 1;
291+
292+
/**
293+
* Rearrange the positions by using the after tag for each tab.
294+
*
295+
* @var integer $position
296+
* @var TabInterface $tab
297+
*/
298+
foreach ($orderByPosition as $position => $tab) {
299+
if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($orderByIdentity))) {
300+
$positionFactor = 1;
301+
continue;
302+
}
303+
304+
$grandPosition = $orderByIdentity[$tab->getAfter()]->getPosition();
305+
$newPosition = $grandPosition + $positionFactor;
257306

258-
$this->assign('tabs', $this->_tabs);
259-
return parent::_beforeToHtml();
307+
unset($orderByPosition[$position]);
308+
$orderByPosition[$newPosition] = $tab;
309+
$tab->setPosition($newPosition);
310+
311+
$positionFactor++;
312+
}
313+
314+
return $this->finalTabsSortOrder($orderByPosition);
260315
}
261316

317+
/**
318+
* Apply the last sort order to tabs.
319+
*
320+
* @param array $orderByPosition
321+
*
322+
* @return array
323+
*/
324+
private function finalTabsSortOrder(array $orderByPosition)
325+
{
326+
ksort($orderByPosition);
327+
328+
$ordered = [];
329+
330+
/** @var TabInterface $tab */
331+
foreach ($orderByPosition as $tab) {
332+
$ordered[$tab->getId()] = $tab;
333+
}
334+
335+
return $ordered;
336+
}
337+
262338
/**
263339
* @return string
264340
*/

app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ public function execute()
5050
$user = $this->_objectManager->create('Magento\User\Model\User')->load($userId);
5151

5252
$user->setId($userId)
53-
->setUsername($this->getRequest()->getParam('username', false))
54-
->setFirstname($this->getRequest()->getParam('firstname', false))
55-
->setLastname($this->getRequest()->getParam('lastname', false))
53+
->setUserName($this->getRequest()->getParam('username', false))
54+
->setFirstName($this->getRequest()->getParam('firstname', false))
55+
->setLastName($this->getRequest()->getParam('lastname', false))
5656
->setEmail(strtolower($this->getRequest()->getParam('email', false)));
5757

5858
if ($this->_objectManager->get('Magento\Framework\Validator\Locale')->isValid($interfaceLocale)) {

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-backend",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-store": "100.1.*",
77
"magento/module-directory": "100.1.*",
88
"magento/module-developer": "100.1.*",

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
data-mage-init='{"dropdown":{}}'
3030
data-toggle="dropdown">
3131
<span class="admin__action-dropdown-text">
32-
<span class="admin-user-account-text"><?php echo $block->escapeHtml($block->getUser()->getUsername()); ?></span>
32+
<span class="admin-user-account-text"><?php echo $block->escapeHtml($block->getUser()->getUserName()); ?></span>
3333
</span>
3434
</a>
3535
<ul class="admin__action-dropdown-menu">
@@ -39,7 +39,7 @@
3939
href="<?php /* @escapeNotVerified */ echo $block->getUrl('adminhtml/system_account/index') ?>"
4040
<?php /* @escapeNotVerified */ echo $block->getUiId('user', 'account', 'settings')?>
4141
title="<?php echo $block->escapeHtml(__('Account Setting')) ?>">
42-
<?php /* @escapeNotVerified */ echo __('Account Setting') ?> (<span class="admin-user-name"><?php echo $block->escapeHtml($block->getUser()->getUsername()); ?></span>)
42+
<?php /* @escapeNotVerified */ echo __('Account Setting') ?> (<span class="admin-user-name"><?php echo $block->escapeHtml($block->getUser()->getUserName()); ?></span>)
4343
</a>
4444
</li>
4545
<?php endif; ?>

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 id="searchPreviewProducts" 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 id="searchPreviewOrders" 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 id="searchPreviewCustomers" 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 id="searchPreviewPages" 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/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ $numColumns = sizeof($block->getColumns());
7272
<?php if ($block->getPagerVisibility()): ?>
7373
<div class="admin__data-grid-pager-wrap">
7474
<select name="<?php /* @escapeNotVerified */ echo $block->getVarNameLimit() ?>"
75-
id="<?php echo $block->escapeHTML($block->getHtmlId())?>_page-limit"
75+
id="<?php echo $block->escapeHtml($block->getHtmlId())?>_page-limit"
7676
onchange="<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.loadByElement(this)"
7777
class="admin__control-select">
7878
<option value="20"<?php if ($block->getCollection()->getPageSize() == 20): ?>
@@ -91,7 +91,7 @@ $numColumns = sizeof($block->getColumns());
9191
selected="selected"<?php endif; ?>>200
9292
</option>
9393
</select>
94-
<label for="<?php echo $block->escapeHTML($block->getHtmlId())?><?php echo $block->escapeHTML($block->getHtmlId())?>_page-limit"
94+
<label for="<?php echo $block->escapeHtml($block->getHtmlId())?><?php echo $block->escapeHtml($block->getHtmlId())?>_page-limit"
9595
class="admin__control-support-text"><?php /* @escapeNotVerified */ echo __('per page') ?></label>
9696

9797
<div class="admin__data-grid-pager">
@@ -107,12 +107,12 @@ $numColumns = sizeof($block->getColumns());
107107
<button type="button" class="action-previous disabled"><span><?php /* @escapeNotVerified */ echo __('Previous page') ?></span></button>
108108
<?php endif; ?>
109109
<input type="text"
110-
id="<?php echo $block->escapeHTML($block->getHtmlId())?>_page-current"
110+
id="<?php echo $block->escapeHtml($block->getHtmlId())?>_page-current"
111111
name="<?php /* @escapeNotVerified */ echo $block->getVarNamePage() ?>"
112112
value="<?php /* @escapeNotVerified */ echo $_curPage ?>"
113113
class="admin__control-text"
114114
onkeypress="<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.inputPage(event, '<?php /* @escapeNotVerified */ echo $_lastPage ?>')" <?php /* @escapeNotVerified */ echo $block->getUiId('current-page') ?> />
115-
<label class="admin__control-support-text" for="<?php echo $block->escapeHTML($block->getHtmlId())?>_page-current">
115+
<label class="admin__control-support-text" for="<?php echo $block->escapeHtml($block->getHtmlId())?>_page-current">
116116
<?php /* @escapeNotVerified */ echo __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
117117
</label>
118118
<?php if ($_curPage < $_lastPage): ?>

app/code/Magento/Backup/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-backup",
33
"description": "N/A",
44
"require": {
5-
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
5+
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.1.0",
66
"magento/module-store": "100.1.*",
77
"magento/module-backend": "100.1.*",
88
"magento/module-cron": "100.1.*",

0 commit comments

Comments
 (0)