Skip to content

Commit

Permalink
Merge pull request #1307 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#2204
#10181
#9852
  • Loading branch information
Oleksii Korshenko authored Jul 10, 2017
2 parents 04c5b80 + 2c106fd commit f215f3d
Show file tree
Hide file tree
Showing 179 changed files with 578 additions and 879 deletions.
8 changes: 3 additions & 5 deletions app/code/Magento/AdminNotification/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_AdminNotification',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdminNotification', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/AdvancedPricingImportExport/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_AdvancedPricingImportExport',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdvancedPricingImportExport', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Analytics/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Analytics',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Analytics', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Authorization/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Authorization',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Authorization', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Authorizenet/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Authorizenet',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Authorizenet', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Backend/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Backend',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Backend', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Backup/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Backup',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Backup', __DIR__);
9 changes: 4 additions & 5 deletions app/code/Magento/Braintree/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Braintree',
__DIR__
);

use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Braintree', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Bundle/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Bundle',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Bundle', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/BundleImportExport/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_BundleImportExport',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_BundleImportExport', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CacheInvalidate/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CacheInvalidate',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CacheInvalidate', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Captcha/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Captcha',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Captcha', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Catalog/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Catalog',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Catalog', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogAnalytics/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogAnalytics',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogAnalytics', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogImportExport/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogImportExport',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogImportExport', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogInventory/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogInventory',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogInventory', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogRule/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogRule',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogRule', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogRuleConfigurable/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogRuleConfigurable',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogRuleConfigurable', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogSearch/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogSearch',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogSearch', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogUrlRewrite/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogUrlRewrite',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogUrlRewrite', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CatalogWidget/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CatalogWidget',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CatalogWidget', __DIR__);
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/Controller/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function _goBack($backUrl = null)
if ($backUrl || $backUrl = $this->getBackUrl($this->_redirect->getRefererUrl())) {
$resultRedirect->setUrl($backUrl);
}

return $resultRedirect;
}

Expand Down
41 changes: 41 additions & 0 deletions app/code/Magento/Checkout/Controller/Cart/Addgroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,42 @@
*/
namespace Magento\Checkout\Controller\Cart;

use Magento\Checkout\Model\Cart as CustomerCart;
use Magento\Framework\Escaper;
use Magento\Framework\App\ObjectManager;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Addgroup extends \Magento\Checkout\Controller\Cart
{
/**
* @var Escaper
*/
private $escaper;

/**
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Checkout\Model\Session $checkoutSession
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator
* @param CustomerCart $cart
* @param Escaper|null $escaper
*/
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Checkout\Model\Session $checkoutSession,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
CustomerCart $cart,
Escaper $escaper = null
) {
$this->escaper = $escaper ?: ObjectManager::getInstance()->get(\Magento\Framework\Escaper::class);
parent::__construct($context, $scopeConfig, $checkoutSession, $storeManager, $formKeyValidator, $cart);
}

/**
* @return \Magento\Framework\Controller\Result\Redirect
*/
Expand All @@ -23,6 +57,13 @@ public function execute()
foreach ($itemsCollection as $item) {
try {
$this->cart->addOrderItem($item, 1);
if (!$this->cart->getQuote()->getHasError()) {
$message = __(
'You added %1 to your shopping cart.',
$this->escaper->escapeHtml($item->getName())
);
$this->messageManager->addSuccessMessage($message);
}
} catch (\Magento\Framework\Exception\LocalizedException $e) {
if ($this->_checkoutSession->getUseNotice(true)) {
$this->messageManager->addNotice($e->getMessage());
Expand Down
8 changes: 3 additions & 5 deletions app/code/Magento/Checkout/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Checkout',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Checkout', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CheckoutAgreements/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CheckoutAgreements',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CheckoutAgreements', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Cms/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Cms',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Cms', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/CmsUrlRewrite/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_CmsUrlRewrite',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CmsUrlRewrite', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/Config/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_Config',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Config', __DIR__);
8 changes: 3 additions & 5 deletions app/code/Magento/ConfigurableImportExport/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Magento_ConfigurableImportExport',
__DIR__
);
use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_ConfigurableImportExport', __DIR__);
Loading

0 comments on commit f215f3d

Please sign in to comment.