Skip to content

Commit 9ab67ea

Browse files
author
Eddie Lau
committed
Merge branch 'develop_mainline' into MAGETWO-49633-php-fork-in-cron
2 parents 9422815 + c98c73d commit 9ab67ea

File tree

707 files changed

+17909
-5182
lines changed

Some content is hidden

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

707 files changed

+17909
-5182
lines changed

.gitignore

+1-1
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

.htaccess.sample

+35-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
############################################
2-
## uncomment the line below to enable developer mode
2+
## overrides deployment configuration mode value
3+
## use command bin/magento deploy:mode:set to switch modes
34

45
# SetEnv MAGE_MODE developer
56

@@ -57,6 +58,32 @@
5758

5859
</IfModule>
5960

61+
<IfModule mod_php7.c>
62+
63+
############################################
64+
## adjust memory limit
65+
66+
php_value memory_limit 768M
67+
php_value max_execution_time 18000
68+
69+
############################################
70+
## disable automatic session start
71+
## before autoload was initialized
72+
73+
php_flag session.auto_start off
74+
75+
############################################
76+
## enable resulting html compression
77+
78+
#php_flag zlib.output_compression on
79+
80+
###########################################
81+
## disable user agent verification to not break multiple image upload
82+
83+
php_flag suhosin.session.cryptua off
84+
85+
</IfModule>
86+
6087
<IfModule mod_security.c>
6188
###########################################
6289
## disable POST processing to not break multiple image upload
@@ -102,6 +129,13 @@
102129

103130
</IfModule>
104131

132+
############################################
133+
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
134+
## Please, set it on virtual host configuration level
135+
136+
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
137+
############################################
138+
105139
<IfModule mod_rewrite.c>
106140

107141
############################################

ISSUE_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Steps to reproduce
2+
--
3+
1. Install Magento from `develop` branch.
4+
2. [Example] Add Configurable Product to the cart.
5+
3. ...
6+
7+
Expected result
8+
--
9+
1. [Example] Configurable product added to the shopping cart.
10+
2. ...
11+
12+
Actual result
13+
--
14+
1. [Example] Error message appears: "Cannot save quote".
15+
2. [Screenshot, logs]
16+
3. ...

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

+2-2
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/AdminNotification/Controller/Adminhtml/Notification.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
abstract class Notification extends \Magento\Backend\App\AbstractAction
1111
{
1212
/**
13-
* @return bool
13+
* Authorization level of a basic admin session
1414
*/
15-
protected function _isAllowed()
16-
{
17-
return $this->_authorization->isAllowed('Magento_AdminNotification::show_list');
18-
}
15+
const ADMIN_RESOURCE = 'Magento_AdminNotification::show_list';
1916
}

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

+7-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1010
{
11+
/**
12+
* Authorization level of a basic admin session
13+
*
14+
* @see _isAllowed()
15+
*/
16+
const ADMIN_RESOURCE = 'Magento_AdminNotification::mark_as_read';
17+
1118
/**
1219
* @return void
1320
*/
@@ -36,12 +43,4 @@ public function execute()
3643
}
3744
$this->_redirect('adminhtml/*/');
3845
}
39-
40-
/**
41-
* @return bool
42-
*/
43-
protected function _isAllowed()
44-
{
45-
return $this->_authorization->isAllowed('Magento_AdminNotification::mark_as_read');
46-
}
4746
}

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1010
{
11+
12+
/**
13+
* Authorization level of a basic admin session
14+
*
15+
* @see _isAllowed()
16+
*/
17+
const ADMIN_RESOURCE = 'Magento_AdminNotification::mark_as_read';
18+
1119
/**
1220
* @return void
1321
*/
@@ -38,12 +46,4 @@ public function execute()
3846
}
3947
$this->_redirect('adminhtml/*/');
4048
}
41-
42-
/**
43-
* @return bool
44-
*/
45-
protected function _isAllowed()
46-
{
47-
return $this->_authorization->isAllowed('Magento_AdminNotification::mark_as_read');
48-
}
4949
}

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1010
{
11+
12+
/**
13+
* Authorization level of a basic admin session
14+
*
15+
* @see _isAllowed()
16+
*/
17+
const ADMIN_RESOURCE = 'Magento_AdminNotification::adminnotification_remove';
18+
1119
/**
1220
* @return void
1321
*/
@@ -33,12 +41,4 @@ public function execute()
3341
}
3442
$this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
3543
}
36-
37-
/**
38-
* @return bool
39-
*/
40-
protected function _isAllowed()
41-
{
42-
return $this->_authorization->isAllowed('Magento_AdminNotification::adminnotification_remove');
43-
}
4444
}

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1010
{
11+
12+
/**
13+
* Authorization level of a basic admin session
14+
*
15+
* @see _isAllowed()
16+
*/
17+
const ADMIN_RESOURCE = 'Magento_AdminNotification::adminnotification_remove';
18+
1119
/**
1220
* @return void
1321
*/
@@ -35,12 +43,4 @@ public function execute()
3543
}
3644
$this->_redirect('adminhtml/*/');
3745
}
38-
39-
/**
40-
* @return bool
41-
*/
42-
protected function _isAllowed()
43-
{
44-
return $this->_authorization->isAllowed('Magento_AdminNotification::adminnotification_remove');
45-
}
4646
}

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

+1-1
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/Controller/Adminhtml/Cache.php

+7-10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010

1111
abstract class Cache extends Action
1212
{
13+
/**
14+
* Authorization level of a basic admin session
15+
*
16+
* @see _isAllowed()
17+
*/
18+
const ADMIN_RESOURCE = 'Magento_Backend::cache';
19+
1320
/**
1421
* @var \Magento\Framework\App\Cache\TypeListInterface
1522
*/
@@ -69,14 +76,4 @@ protected function _validateTypes(array $types)
6976
throw new LocalizedException(__('Specified cache type(s) don\'t exist: %1', join(', ', $invalidTypes)));
7077
}
7178
}
72-
73-
/**
74-
* Check if cache management is allowed
75-
*
76-
* @return bool
77-
*/
78-
protected function _isAllowed()
79-
{
80-
return $this->_authorization->isAllowed('Magento_Backend::cache');
81-
}
8279
}

app/code/Magento/Backend/Controller/Adminhtml/Dashboard.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
abstract class Dashboard extends \Magento\Backend\App\Action
1515
{
1616
/**
17-
* @return bool
17+
* Authorization level of a basic admin session
18+
*
19+
* @see _isAllowed()
1820
*/
19-
protected function _isAllowed()
20-
{
21-
return $this->_authorization->isAllowed('Magento_Backend::dashboard');
22-
}
21+
const ADMIN_RESOURCE = 'Magento_Backend::dashboard';
2322
}

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
abstract class System extends AbstractAction
1616
{
1717
/**
18-
* @return bool
18+
* Authorization level of a basic admin session
19+
*
20+
* @see _isAllowed()
1921
*/
20-
protected function _isAllowed()
21-
{
22-
return $this->_authorization->isAllowed('Magento_Backend::system');
23-
}
22+
const ADMIN_RESOURCE = 'Magento_Backend::system';
2423
}

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
abstract class Account extends Action
1616
{
1717
/**
18-
* @return bool
18+
* Authorization level of a basic admin session
19+
*
20+
* @see _isAllowed()
1921
*/
20-
protected function _isAllowed()
21-
{
22-
return $this->_authorization->isAllowed('Magento_Backend::myaccount');
23-
}
22+
const ADMIN_RESOURCE = 'Magento_Backend::myaccount';
2423
}

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

+10-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,16 @@ public function execute()
6767
$user->setPassword($password);
6868
$user->setPasswordConfirmation($passwordConfirmation);
6969
}
70-
$user->save();
71-
72-
$user->sendNotificationEmailsIfRequired();
73-
74-
$this->messageManager->addSuccess(__('You saved the account.'));
70+
$errors = $user->validate();
71+
if ($errors !== true && !empty($errors)) {
72+
foreach ($errors as $error) {
73+
$this->messageManager->addError($error);
74+
}
75+
} else {
76+
$user->save();
77+
$user->sendNotificationEmailsIfRequired();
78+
$this->messageManager->addSuccess(__('You saved the account.'));
79+
}
7580
} catch (UserLockedException $e) {
7681
$this->_auth->logout();
7782
$this->securityCookieHelper->setLogoutReasonCookie(

app/code/Magento/Backend/Controller/Adminhtml/System/Design.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
abstract class Design extends Action
1111
{
12+
/**
13+
* Authorization level of a basic admin session
14+
*
15+
* @see _isAllowed()
16+
*/
17+
const ADMIN_RESOURCE = 'Magento_Backend::design';
18+
1219
/**
1320
* Core registry
1421
*
@@ -59,12 +66,4 @@ public function __construct(
5966
$this->resultPageFactory = $resultPageFactory;
6067
$this->resultLayoutFactory = $resultLayoutFactory;
6168
}
62-
63-
/**
64-
* @return bool
65-
*/
66-
protected function _isAllowed()
67-
{
68-
return $this->_authorization->isAllowed('Magento_Backend::design');
69-
}
7069
}

app/code/Magento/Backend/Controller/Adminhtml/System/Store.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
*/
2020
abstract class Store extends Action
2121
{
22+
/**
23+
* Authorization level of a basic admin session
24+
*
25+
* @see _isAllowed()
26+
*/
27+
const ADMIN_RESOURCE = 'Magento_Backend::store';
28+
2229
/**
2330
* Core registry
2431
*
@@ -77,14 +84,6 @@ protected function createPage()
7784
return $resultPage;
7885
}
7986

80-
/**
81-
* @return bool
82-
*/
83-
protected function _isAllowed()
84-
{
85-
return $this->_authorization->isAllowed('Magento_Backend::store');
86-
}
87-
8887
/**
8988
* Backup database
9089
*

0 commit comments

Comments
 (0)