Skip to content

Commit

Permalink
Merge branch 'develop' of github.corp.magento.com:magento2/magento2ce…
Browse files Browse the repository at this point in the history
… into MAGETWO-44600
  • Loading branch information
Dell- committed Nov 1, 2015
2 parents c318d40 + 8e3ca1f commit ddd81f2
Show file tree
Hide file tree
Showing 2,965 changed files with 39,861 additions and 22,026 deletions.
33 changes: 33 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,32 @@

</IfModule>

<IfModule mod_php7.c>

############################################
## adjust memory limit

php_value memory_limit 768M
php_value max_execution_time 18000

############################################
## disable automatic session start
## before autoload was initialized

php_flag session.auto_start off

############################################
## enable resulting html compression

#php_flag zlib.output_compression on

###########################################
## disable user agent verification to not break multiple image upload

php_flag suhosin.session.cryptua off

</IfModule>

<IfModule mod_security.c>
###########################################
## disable POST processing to not break multiple image upload
Expand Down Expand Up @@ -103,6 +129,13 @@

</IfModule>

############################################
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
## Please, set it on virtual host configuration level

## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
############################################

<IfModule mod_rewrite.c>

############################################
Expand Down
11 changes: 9 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@
require_once __DIR__ . '/autoload.php';
require_once BP . '/app/functions.php';

if (!empty($_SERVER['MAGE_PROFILER'])) {
\Magento\Framework\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], BP, !empty($_REQUEST['isAjax']));
if (!empty($_SERVER['MAGE_PROFILER'])
&& isset($_SERVER['HTTP_ACCEPT'])
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
) {
\Magento\Framework\Profiler::applyConfig(
$_SERVER['MAGE_PROFILER'],
BP,
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
);
}
if (ini_get('date.timezone') == '') {
date_default_timezone_set('UTC');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
*
* @return void
*/
public function execute()
public function executeInternal()
{
if (!$this->getRequest()->getPostValue()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
/**
* @return void
*/
public function execute()
public function executeInternal()
{
$this->_view->loadLayout();
$this->_setActiveMenu(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notific
/**
* @return void
*/
public function execute()
public function executeInternal()
{
$notificationId = (int)$this->getRequest()->getParam('id');
if ($notificationId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
/**
* @return void
*/
public function execute()
public function executeInternal()
{
$ids = $this->getRequest()->getParam('notification');
if (!is_array($ids)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notific
/**
* @return void
*/
public function execute()
public function executeInternal()
{
$ids = $this->getRequest()->getParam('notification');
if (!is_array($ids)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notificatio
/**
* @return void
*/
public function execute()
public function executeInternal()
{
if ($id = $this->getRequest()->getParam('id')) {
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
/**
* @return void
*/
public function execute()
public function executeInternal()
{
$severity = $this->getRequest()->getParam('severity');
if ($severity) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GetFilter extends ExportController
*
* @return \Magento\Framework\Controller\ResultInterface
*/
public function execute()
public function executeInternal()
{
$data = $this->getRequest()->getParams();
if ($this->getRequest()->isXmlHttpRequest() && $data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
public function execute()
public function executeInternal()
{
$paymentParam = $this->getRequest()->getParam('payment');
$controller = $this->getRequest()->getParam('controller');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function _returnQuote($cancelOrder, $errorMsg)
*
* @return \Magento\Framework\View\Result\Layout
*/
public function execute()
public function executeInternal()
{
$redirectParams = $this->getRequest()->getParams();
$params = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function _returnQuote()
*
* @return void
*/
public function execute()
public function executeInternal()
{
$this->_returnQuote();
$this->getResponse()->representJson(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ protected function _returnCustomerQuote($cancelOrder = false, $errorMsg = '')
$order = $this->_objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($incrementId);
if ($order->getId()) {
try {
/** @var \Magento\Quote\Model\QuoteRepository $quoteRepository */
$quoteRepository = $this->_objectManager->create('Magento\Quote\Model\QuoteRepository');
/** @var \Magento\Quote\Api\CartRepositoryInterface $quoteRepository */
$quoteRepository = $this->_objectManager->create('Magento\Quote\Api\CartRepositoryInterface');
/** @var \Magento\Quote\Model\Quote $quote */
$quote = $quoteRepository->get($order->getQuoteId());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Paymen
*
* @return void
*/
public function execute()
public function executeInternal()
{
$this->_responseAction('adminhtml');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
*
* @return string
*/
public function execute()
public function executeInternal()
{
$paymentParam = $this->getRequest()->getParam('payment');
$controller = $this->getRequest()->getParam('controller');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Redirect extends \Magento\Authorizenet\Controller\Directpost\Payment
*
* @return void
*/
public function execute()
public function executeInternal()
{
$helper = $this->dataFactory->create('frontend');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
*
* @return void
*/
public function execute()
public function executeInternal()
{
$this->_responseAction('frontend');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ReturnQuote extends \Magento\Authorizenet\Controller\Directpost\Payment
*
* @return void
*/
public function execute()
public function executeInternal()
{
$this->_returnCustomerQuote();
$this->getResponse()->representJson(
Expand Down
12 changes: 11 additions & 1 deletion app/code/Magento/Authorizenet/Model/Authorizenet.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Magento\Authorizenet\Model;

use Magento\Authorizenet\Model\TransactionService;
use Magento\Framework\HTTP\ZendClientFactory;

/**
* @SuppressWarnings(PHPMD.TooManyFields)
Expand Down Expand Up @@ -97,6 +98,11 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
*/
protected $_debugReplacePrivateDataKeys = ['merchantAuthentication', 'x_login'];

/**
* @var \Magento\Framework\HTTP\ZendClientFactory
*/
protected $httpClientFactory;

/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
Expand All @@ -111,6 +117,7 @@ abstract class Authorizenet extends \Magento\Payment\Model\Method\Cc
* @param \Magento\Authorizenet\Model\Request\Factory $requestFactory
* @param \Magento\Authorizenet\Model\Response\Factory $responseFactory
* @param \Magento\Authorizenet\Model\TransactionService $transactionService
* @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
Expand All @@ -130,6 +137,7 @@ public function __construct(
\Magento\Authorizenet\Model\Request\Factory $requestFactory,
\Magento\Authorizenet\Model\Response\Factory $responseFactory,
TransactionService $transactionService,
ZendClientFactory $httpClientFactory,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
array $data = []
Expand All @@ -138,6 +146,7 @@ public function __construct(
$this->requestFactory = $requestFactory;
$this->responseFactory = $responseFactory;
$this->transactionService = $transactionService;
$this->httpClientFactory = $httpClientFactory;

parent::__construct(
$context,
Expand Down Expand Up @@ -370,7 +379,8 @@ protected function buildRequest(\Magento\Framework\DataObject $payment)
protected function postRequest(\Magento\Authorizenet\Model\Request $request)
{
$result = $this->responseFactory->create();
$client = new \Magento\Framework\HTTP\ZendClient();
/** @var \Magento\Framework\HTTP\ZendClient $client */
$client = $this->httpClientFactory->create();
$url = $this->getConfigData('cgi_url') ?: self::CGI_URL;
$debugData = ['url' => $url, 'request' => $request->getData()];
$client->setUri($url);
Expand Down
Loading

0 comments on commit ddd81f2

Please sign in to comment.