Skip to content

Commit 73ce327

Browse files
committed
Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-63215
2 parents 0111bac + c7fff61 commit 73ce327

File tree

1,508 files changed

+68356
-19817
lines changed

Some content is hidden

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

1,508 files changed

+68356
-19817
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ atlassian*
5151
!/var/.htaccess
5252
/vendor/*
5353
!/vendor/.htaccess
54+
/generated/*
55+
!/generated/.htaccess

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ matrix:
3131
before_install: ./dev/travis/before_install.sh
3232
install: composer install --no-interaction --prefer-dist
3333
before_script: ./dev/travis/before_script.sh
34-
script:
34+
script:
3535
- cd dev/tests/$TEST_SUITE
3636
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
3737
- phpunit $TEST_FILTER

README.md

Lines changed: 6 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,14 @@
33
<h2>Welcome</h2>
44
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.
55

6-
The installation instructions that used to be here are now published on our GitHub site. Use the information on this page to get started or go directly to the <a href="http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html" target="_blank">guide</a>.
6+
## Magento system requirements
7+
[Magento system requirements](http://devdocs.magento.com/magento-system-requirements.html)
78

8-
<h2>New to Magento? Need some help?</h2>
9-
If you're not sure about the following, you probably need a little help before you start installing the Magento software:
9+
## Install Magento
10+
To install Magento, see either:
1011

11-
* Is the Magento software <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_magento-installed.html">installed already</a>?
12-
* What's a <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_login.html">terminal, command prompt, or Secure Shell (ssh)</a>?
13-
* Where's my <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_login.html">Magento server</a> and how do I access it?
14-
* What's <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_software.html">PHP</a>?
15-
* What's <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_software.html">Apache</a>?
16-
* What's <a href="http://devdocs.magento.com/guides/v2.0/install-gde/basics/basics_software.html">MySQL</a>?
17-
18-
<h2>Step 1: Verify your prerequisites</h2>
19-
20-
Use the following table to verify you have the correct prerequisites to install the Magento software.
21-
22-
<table>
23-
<tbody>
24-
<tr>
25-
<th>Prerequisite</th>
26-
<th>How to check</th>
27-
<th>For more information</th>
28-
</tr>
29-
<tr>
30-
<td>Apache 2.2 or 2.4</td>
31-
<td>Ubuntu: <code>apache2 -v</code><br>
32-
CentOS: <code>httpd -v</code></td>
33-
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache.html">Apache</a></td>
34-
</tr>
35-
<tr>
36-
<td>PHP 5.6.x, 7.0.2 or 7.0.6</td>
37-
<td><code>php -v</code></td>
38-
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html">PHP Ubuntu</a><br><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html">PHP CentOS</a></td>
39-
</tr>
40-
<tr><td>MySQL 5.6.x</td>
41-
<td><code>mysql -u [root user name] -p</code></td>
42-
<td><a href="http://devdocs.magento.com/guides/v2.0/install-gde/prereq/mysql.html">MySQL</a></td>
43-
</tr>
44-
</tbody>
45-
</table>
46-
47-
<h2>Step 2: Prepare to install</h2>
48-
49-
After verifying your prerequisites, perform the following tasks in order to prepare to install the Magento software.
50-
51-
1. <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/composer-clone.html#instgde-prereq-compose-install">Install Composer</a>
52-
2. <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/composer-clone.html#instgde-prereq-compose-clone">Clone the Magento repository</a>
53-
54-
<h2>Step 3: Install and verify the installation</h2>
55-
56-
1. <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/prepare-install.html">Update installation dependencies</a>
57-
2. Install Magento:
58-
* <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/install-web.html">Install Magento software using the web interface</a>
59-
* <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/install-cli.html">Install Magento software using the command line</a>
60-
2. <a href="http://devdocs.magento.com/guides/v2.0/install-gde/install/verify.html">Verify the installation</a>
12+
* [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento.
13+
* [Installation guide](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html)
6114

6215
<h2>Contributing to the Magento 2 code base</h2>
6316
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.

app/bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@
5858
}
5959

6060
date_default_timezone_set('UTC');
61+
62+
/* Adjustment of precision value for several versions of PHP */
63+
ini_set('precision', 17);
64+
ini_set('serialize_precision', 17);

app/code/Magento/AdminNotification/view/adminhtml/web/system/notification.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'jquery',
78
'mage/template',
@@ -15,20 +16,22 @@ define([
1516
modalClass: 'modal-system-messages',
1617
systemMessageTemplate:
1718
'<% _.each(data.items, function(item) { %>' +
18-
'<li class="message message-warning <% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
19+
'<li class="message message-warning' +
20+
'<% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
1921
'<%= item.text %>' +
2022
'</li>' +
2123
'<% }); %>'
2224
},
2325

24-
_create: function() {
26+
/** @inheritdoc */
27+
_create: function () {
2528
this.options.title = $('#message-system-all').attr('title');
2629
this._super();
2730
},
2831

32+
/** @inheritdoc */
2933
openModal: function (severity) {
3034
var superMethod = $.proxy(this._super, this);
31-
//this.modal.options
3235

3336
$.ajax({
3437
url: this.options.ajaxUrl,
@@ -56,6 +59,8 @@ define([
5659

5760
return this;
5861
},
62+
63+
/** @inheritdoc */
5964
closeModal: function () {
6065
this._super();
6166
}

app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
6-
"jquery",
7-
"jquery/ui",
8-
"domReady!"
7+
'jquery',
8+
'jquery/ui',
9+
'domReady!'
910
], function ($) {
1011
'use strict';
1112

12-
// Mark notification as read via AJAX call
13+
/**
14+
* Mark notification as read via AJAX call.
15+
*
16+
* @param {String} notificationId
17+
*/
1318
var markNotificationAsRead = function (notificationId) {
1419
var requestUrl = $('.notifications-wrapper .admin__action-dropdown-menu').attr('data-mark-as-read-url');
20+
1521
$.ajax({
1622
url: requestUrl,
1723
type: 'POST',
@@ -22,19 +28,24 @@ define([
2228
showLoader: false
2329
});
2430
},
25-
2631
notificationCount = $('.notifications-wrapper').attr('data-notification-count'),
2732

28-
// Remove notification from the list
33+
/**
34+
* Remove notification from the list.
35+
*
36+
* @param {jQuery} notificationEntry
37+
*/
2938
removeNotificationFromList = function (notificationEntry) {
39+
var notificationIcon, actionElement;
40+
3041
notificationEntry.remove();
3142
notificationCount--;
3243
$('.notifications-wrapper').attr('data-notification-count', notificationCount);
3344

34-
if (notificationCount == 0) {
45+
if (notificationCount == 0) {// eslint-disable-line eqeqeq
3546
// Change appearance of the bubble and its behavior when the last notification is removed
3647
$('.notifications-wrapper .admin__action-dropdown-menu').remove();
37-
var notificationIcon = $('.notifications-wrapper .notifications-icon');
48+
notificationIcon = $('.notifications-wrapper .notifications-icon');
3849
notificationIcon.removeAttr('data-toggle');
3950
notificationIcon.off('click.dropdown');
4051
$('.notifications-action .notifications-counter').text('').hide();
@@ -45,12 +56,16 @@ define([
4556
}
4657
$('.notifications-entry-last .notifications-counter').text(notificationCount);
4758
// Modify caption of the 'See All' link
48-
var actionElement = $('.notifications-wrapper .admin__action-dropdown-menu .last .action-more');
59+
actionElement = $('.notifications-wrapper .admin__action-dropdown-menu .last .action-more');
4960
actionElement.text(actionElement.text().replace(/\d+/, notificationCount));
5061
}
5162
},
5263

53-
// Show notification details
64+
/**
65+
* Show notification details.
66+
*
67+
* @param {jQuery} notificationEntry
68+
*/
5469
showNotificationDetails = function (notificationEntry) {
5570
var notificationDescription = notificationEntry.find('.notifications-entry-description'),
5671
notificationDescriptionEnd = notificationEntry.find('.notifications-entry-description-end');
@@ -59,20 +74,22 @@ define([
5974
notificationDescriptionEnd.addClass('_show');
6075
}
6176

62-
if(notificationDescription.hasClass('_cutted')) {
77+
if (notificationDescription.hasClass('_cutted')) {
6378
notificationDescription.removeClass('_cutted');
6479
}
6580
};
6681

6782
// Show notification description when corresponding item is clicked
68-
$('.notifications-wrapper .admin__action-dropdown-menu .notifications-entry').on('click.showNotification', function (event) {
69-
// hide notification dropdown
70-
$('.notifications-wrapper .notifications-icon').trigger('click.dropdown');
83+
$('.notifications-wrapper .admin__action-dropdown-menu .notifications-entry').on(
84+
'click.showNotification',
85+
function (event) {
86+
// hide notification dropdown
87+
$('.notifications-wrapper .notifications-icon').trigger('click.dropdown');
7188

72-
showNotificationDetails($(this));
73-
event.stopPropagation();
74-
75-
});
89+
showNotificationDetails($(this));
90+
event.stopPropagation();
91+
}
92+
);
7693

7794
// Remove corresponding notification from the list and mark it as read
7895
$('.notifications-close').on('click.removeNotification', function (event) {
@@ -83,19 +100,19 @@ define([
83100
removeNotificationFromList(notificationEntry);
84101

85102
// Checking for last unread notification to hide dropdown
86-
if (notificationCount == 0) {
103+
if (notificationCount == 0) {// eslint-disable-line eqeqeq
87104
$('.notifications-wrapper').removeClass('active')
88-
.find('.notifications-action').removeAttr('data-toggle')
89-
.off('click.dropdown');
105+
.find('.notifications-action')
106+
.removeAttr('data-toggle')
107+
.off('click.dropdown');
90108
}
91109
event.stopPropagation();
92110
});
93111

94112
// Hide notifications bubble
95-
if (notificationCount == 0) {
113+
if (notificationCount == 0) {// eslint-disable-line eqeqeq
96114
$('.notifications-action .notifications-counter').hide();
97115
} else {
98116
$('.notifications-action .notifications-counter').show();
99117
}
100-
101118
});
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Analytics\Block\Adminhtml\System\Config;
7+
8+
use Magento\Analytics\Model\SubscriptionStatusProvider;
9+
use Magento\Backend\Block\Template\Context;
10+
use Magento\Framework\Data\Form\Element\AbstractElement;
11+
12+
/**
13+
* Class SubscriptionStatusLabel.
14+
*
15+
* Provides labels for subscription status
16+
* Status can be reviewed in System Configuration
17+
*/
18+
class SubscriptionStatusLabel extends \Magento\Config\Block\System\Config\Form\Field
19+
{
20+
/**
21+
* @var SubscriptionStatusProvider
22+
*/
23+
private $subscriptionStatusProvider;
24+
25+
/**
26+
* SubscriptionStatusLabel constructor.
27+
*
28+
* @param Context $context
29+
* @param SubscriptionStatusProvider $labelStatusProvider
30+
* @param array $data
31+
*/
32+
public function __construct(
33+
Context $context,
34+
SubscriptionStatusProvider $labelStatusProvider,
35+
array $data = []
36+
) {
37+
parent::__construct($context, $data);
38+
$this->subscriptionStatusProvider = $labelStatusProvider;
39+
}
40+
41+
/**
42+
* Unset some non-related element parameters
43+
*
44+
* @param \Magento\Framework\Data\Form\Element\AbstractElement $element
45+
* @return string
46+
*/
47+
public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
48+
{
49+
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
50+
$element->setData(
51+
'value',
52+
$this->prepareLabelValue()
53+
);
54+
return parent::render($element);
55+
}
56+
57+
/**
58+
* Prepare label for subscription status
59+
*
60+
* @return string
61+
*/
62+
private function prepareLabelValue()
63+
{
64+
return __('Subscription status') . ': ' . __($this->subscriptionStatusProvider->getStatus());
65+
}
66+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Analytics\Controller\Adminhtml\BasicTier;
7+
8+
use Magento\Backend\App\Action;
9+
use Magento\Config\Model\Config;
10+
use Magento\Backend\App\Action\Context;
11+
12+
/**
13+
* Class SignUp
14+
*
15+
* Provides link to Basic Tier signup
16+
*/
17+
class SignUp extends Action
18+
{
19+
/**
20+
* @var string
21+
*/
22+
private $basicTierUrlPath = 'analytics/url/basic_tier';
23+
24+
/**
25+
* @var Config
26+
*/
27+
private $config;
28+
29+
/**
30+
* @param Context $context
31+
* @param Config $config
32+
*/
33+
public function __construct(
34+
Context $context,
35+
Config $config
36+
) {
37+
$this->config = $config;
38+
parent::__construct($context);
39+
}
40+
41+
/**
42+
* Check admin permissions for this controller
43+
*
44+
* @return boolean
45+
*/
46+
protected function _isAllowed()
47+
{
48+
return $this->_authorization->isAllowed('Magento_Analytics::report_basic_tier');
49+
}
50+
51+
/**
52+
* Provides link to Basic Tier signup
53+
*
54+
* @return \Magento\Framework\Controller\AbstractResult
55+
*/
56+
public function execute()
57+
{
58+
return $this->resultRedirectFactory->create()->setUrl(
59+
$this->config->getConfigDataValue($this->basicTierUrlPath)
60+
);
61+
}
62+
}

0 commit comments

Comments
 (0)