Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Osztromok committed May 26, 2017
2 parents 436d046 + ae53ec1 commit 8fc99b1
Show file tree
Hide file tree
Showing 3,442 changed files with 121,642 additions and 50,081 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
/.settings
atlassian*
/nbproject
/robots.txt
/pub/robots.txt
/sitemap
/sitemap.xml
/pub/sitemap
/pub/sitemap.xml
/.idea
/.gitattributes
/app/config_sandbox
Expand Down Expand Up @@ -41,6 +45,7 @@ atlassian*
!/pub/media/customer/.htaccess
/pub/media/downloadable/*
!/pub/media/downloadable/.htaccess
/pub/media/favicon/*
/pub/media/import/*
!/pub/media/import/.htaccess
/pub/media/theme/*
Expand Down
29 changes: 18 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,46 @@ addons:
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
firefox: "46.0"
hosts:
- magento2.travis
language: php
php:
- 5.6.29
- 7.0
- 7.1
env:
global:
- COMPOSER_BIN_DIR=~/bin
- INTEGRATION_SETS=3
- NODE_JS_VERSION=6
- MAGENTO_HOST_NAME="magento2.travis"
matrix:
- TEST_SUITE=unit
- TEST_SUITE=integration INTEGRATION_INDEX=1
- TEST_SUITE=integration INTEGRATION_INDEX=2
- TEST_SUITE=integration INTEGRATION_INDEX=3
- TEST_SUITE=static
- TEST_SUITE=js
- TEST_SUITE=functional ACCEPTANCE_INDEX=1
- TEST_SUITE=functional ACCEPTANCE_INDEX=2
matrix:
exclude:
- php: 7.0
env: TEST_SUITE=static
- php: 7.0
env: TEST_SUITE=js
- php: 7.0
env: TEST_SUITE=functional ACCEPTANCE_INDEX=1
- php: 7.0
env: TEST_SUITE=functional ACCEPTANCE_INDEX=2
cache:
apt: true
directories:
- $HOME/.composer/cache
- $HOME/.nvm
- $HOME/node_modules
- $HOME/yarn.lock
matrix:
exclude:
- php: 5.6.29
env: TEST_SUITE=static
- php: 5.6.29
env: TEST_SUITE=js
before_install: ./dev/travis/before_install.sh
install: composer install --no-interaction --prefer-dist
before_script: ./dev/travis/before_script.sh
script:
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt spec; fi
script: ./dev/travis/script.sh
2 changes: 1 addition & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact [email protected] for a copy.

Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
Please see <insert file name of the MEE license> for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,33 @@ To suggest documentation improvements, click [here][4].
[3]: <https://github.com/magento/magento2/issues>
[4]: <http://devdocs.magento.com>

<h3>Labels applied by the Magento team</h3>

| Label | Description |
| ------------- |-------------|
| ![DOC](http://devdocs.magento.com/common/images/github_DOC.png) | Affects Documentation domain. |
| ![PROD](http://devdocs.magento.com/common/images/github_PROD.png) | Affects the Product team (mostly feature requests or business logic change). |
| ![TECH](http://devdocs.magento.com/common/images/github_TECH.png) | Affects Architect Group (mostly to make decisions around technology changes). |
| ![accept](http://devdocs.magento.com/common/images/github_accept.png) | The pull request has been accepted and will be merged into mainline code. |
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
| ![acknowledged](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
| ![acknowledged](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |

<h2>Reporting security issues</h2>

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>.

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>.
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.

<h2>License</h2>

Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license

http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact [email protected] for a copy.

Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.

6 changes: 3 additions & 3 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
#ini_set('display_errors', 1);

/* PHP version validation */
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID >= 50605 && PHP_VERSION_ID < 50700 || PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. ' .
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<p>Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. Please read
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
<a target="_blank" href="http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html">
Magento System Requirements</a>.
</div>
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdminNotification/Block/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
namespace Magento\AdminNotification\Block;

/**
* @api
*/
class Inbox extends \Magento\Backend\Block\Widget\Grid\Container
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

use Magento\Framework\Notification\MessageInterface;

/**
* @api
*/
class UnreadMessagePopup extends \Magento\Backend\Block\Template
{
/**
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/AdminNotification/Block/ToolbarEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/**
* Toolbar entry that shows latest notifications
*
* @api
* @author Magento Core Team <[email protected]>
*/
class ToolbarEntry extends \Magento\Backend\Block\Template
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdminNotification/Block/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
namespace Magento\AdminNotification\Block;

/**
* @api
*/
class Window extends \Magento\Backend\Block\Template
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* AdminNotification Inbox model
*
* @api
* @author Magento Core Team <[email protected]>
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-admin-notification",
"description": "N/A",
"require": {
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/module-store": "100.2.*",
"magento/module-backend": "100.2.*",
"magento/module-media-storage": "100.2.*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<block class="Magento\AdminNotification\Block\Window"
name="notification_window"
as="notification_window"
acl="Magento_AdminNotification::show_toolbar"
aclResource="Magento_AdminNotification::show_toolbar"
template="Magento_AdminNotification::notification/window.phtml"/>
</referenceContainer>
<referenceContainer name="header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,35 @@
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">notification_area.notification_area_data_source</item>
<item name="deps" xsi:type="string">notification_area.notification_area_data_source</item>
</item>
<item name="spinner" xsi:type="string">columns</item>
</argument>
<dataSource name="notification_area_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\AdminNotification\Ui\Component\DataProvider\DataProvider</argument>
<argument name="name" xsi:type="string">notification_area_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">identity</argument>
<argument name="requestFieldName" xsi:type="string">identity</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">identity</item>
</item>
</item>
</argument>
</argument>
<settings>
<spinner>columns</spinner>
<deps>
<dep>notification_area.notification_area_data_source</dep>
</deps>
</settings>
<dataSource name="notification_area_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<storageConfig>
<param name="indexField" xsi:type="string">identity</param>
</storageConfig>
<updateUrl path="mui/index/render"/>
</settings>
<dataProvider class="Magento\AdminNotification\Ui\Component\DataProvider\DataProvider" name="notification_area_data_source">
<settings>
<requestFieldName>identity</requestFieldName>
<primaryFieldName>identity</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<columns name="columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_AdminNotification/js/grid/listing</item>
<item name="template" xsi:type="string">Magento_AdminNotification/grid/listing</item>
</item>
</argument>
<column name="created_at">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_AdminNotification/js/grid/columns/message</item>
<item name="label" xsi:type="string" translate="true"/>
<item name="dataType" xsi:type="string">text</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="sortOrder" xsi:type="number">30</item>
</item>
</argument>
<columns name="columns" component="Magento_AdminNotification/js/grid/listing" template="Magento_AdminNotification/grid/listing">
<column name="created_at" component="Magento_AdminNotification/js/grid/columns/message" sortOrder="30">
<settings>
<dataType>text</dataType>
<label translate="true"/>
<sorting>asc</sorting>
</settings>
</column>
</columns>
</listing>
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedPricingImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-advanced-pricing-import-export",
"description": "N/A",
"require": {
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/module-catalog": "101.1.*",
"magento/module-catalog-inventory": "100.2.*",
"magento/module-eav": "100.2.*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,24 @@

namespace Magento\Analytics\Controller\Adminhtml\Subscription;

use Magento\Analytics\Model\Config\Backend\Enabled;
use Magento\Analytics\Model\NotificationTime;
use Magento\Analytics\Model\Subscription;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Config\Model\Config\Source\Enabledisable;
use Magento\Config\Model\PreparedValueFactory;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Controller\Result\Json;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
use Psr\Log\LoggerInterface;

/**
* Activates subscription to Magento BI Advanced Reporting.
*/
class Activate extends Action
{
/**
* Resource for managing subscription to Magento BI.
*
* @var Subscription
*/
private $subscription;

/**
* @var LoggerInterface
*/
Expand All @@ -46,23 +43,36 @@ class Activate extends Action
*/
private $subscriptionApprovedField = 'analytics_subscription_checkbox';

/**
* @var AbstractDb
*/
private $configValueResource;

/**
* @var PreparedValueFactory
*/
private $preparedValueFactory;

/**
* Activate constructor.
*
* @param Context $context
* @param Subscription $subscription
* @param LoggerInterface $logger
* @param NotificationTime $notificationTime
* @param AbstractDb $configValueResource
* @param PreparedValueFactory $preparedValueFactory
*/
public function __construct(
Context $context,
Subscription $subscription,
LoggerInterface $logger,
NotificationTime $notificationTime
NotificationTime $notificationTime,
AbstractDb $configValueResource,
PreparedValueFactory $preparedValueFactory
) {
$this->subscription = $subscription;
$this->logger = $logger;
$this->notificationTime = $notificationTime;
$this->configValueResource = $configValueResource;
$this->preparedValueFactory = $preparedValueFactory;
parent::__construct($context);
}

Expand All @@ -85,7 +95,14 @@ public function execute()
{
try {
if ($this->getRequest()->getParam($this->subscriptionApprovedField)) {
$this->subscription->enable();
$configValue = $this->preparedValueFactory->create(
Enabled::XML_ENABLED_CONFIG_STRUCTURE_PATH,
Enabledisable::ENABLE_VALUE,
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
);

$this->configValueResource
->save($configValue);
} else {
$this->notificationTime->unsetLastTimeNotificationValue();
}
Expand Down
Loading

0 comments on commit 8fc99b1

Please sign in to comment.