Skip to content

Commit

Permalink
2.0.0.0-dev64
Browse files Browse the repository at this point in the history
* Modularity improvements:
  * Moved abstract shopping cart logic from the Paypal module to the Payments module
* Caching improvements:
  * Added a new mechanism to uniquely identify page content (a hash-key for cache storage)
  * Replaced the "magentoZoom" plugin with two widgets: the "gallery" and "zoom"
* Fixed bugs:
  * Fixed an issue with inserting an image in WYSIWYG editor where the selected folder was stored in session
  * Fixed an issue with CMS Page Links not being shown because of the empty text in the link
  * Fixed an issue where zooming functionality was not disabled for the responsive design
  * Fixed an issue with zooming on a configurable product page where the main product image was shown instead of the selected option images
* Updated various PHPDoc with parameter and return types
* Moved quote-related multishipping logic to the Multishipping module
* Resolved dependencies between the Payment and Multishipping modules
* Moved the framework part of the Translate functionality from modules to the library
* Created the architecture for the email template library
* Introduced a consistent approach for using the Config scope
* Fixed an issue with the dependency static test
  • Loading branch information
magento-team committed Feb 6, 2014
1 parent 75b80bc commit 271615a
Show file tree
Hide file tree
Showing 674 changed files with 13,658 additions and 7,688 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2.0.0.0-dev64
=============
* Modularity improvements:
* Moved abstract shopping cart logic from the Paypal module to the Payments module
* Caching improvements:
* Added a new mechanism to uniquely identify page content (a hash-key for cache storage)
* Replaced the "magentoZoom" plugin with two widgets: the "gallery" and "zoom"
* Fixed bugs:
* Fixed an issue with inserting an image in WYSIWYG editor where the selected folder was stored in session
* Fixed an issue with CMS Page Links not being shown because of the empty text in the link
* Fixed an issue where zooming functionality was not disabled for the responsive design
* Fixed an issue with zooming on a configurable product page where the main product image was shown instead of the selected option images
* Updated various PHPDoc with parameter and return types
* Moved quote-related multishipping logic to the Multishipping module
* Resolved dependencies between the Payment and Multishipping modules
* Moved the framework part of the Translate functionality from modules to the library
* Created the architecture for the email template library
* Introduced a consistent approach for using the Config scope
* Fixed an issue with the dependency static test

2.0.0.0-dev63
=============
* Modularity improvements:
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Authorizenet/Model/Authorizenet.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
protected $_canVoid = true;
protected $_canUseInternal = true;
protected $_canUseCheckout = true;
protected $_canUseForMultishipping = true;
protected $_canSaveCc = false;
protected $_canFetchTransactionInfo = true;

Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Authorizenet/Model/Directpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet
protected $_canVoid = true;
protected $_canUseInternal = true;
protected $_canUseCheckout = true;
protected $_canUseForMultishipping = false;
protected $_canSaveCc = false;
protected $_isInitializeNeeded = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
Expand All @@ -19,14 +20,15 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
namespace Magento\Core\Model\Config;

class TestReaderClass
{
public function read($scope = 'primary')
{
return $scope;
}
}
-->
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../Magento/Payment/etc/payment.xsd">
<methods>
<method name="authorizenet">
<allow_multiple_address>1</allow_multiple_address>
<allow_multiple_with_3dsecure>1</allow_multiple_with_3dsecure>
</method>
</methods>
</payment>
18 changes: 9 additions & 9 deletions app/code/Magento/Backend/App/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
class Config implements ConfigInterface
{
/**
* @var \Magento\Core\Model\Config\SectionPool
* @var \Magento\App\Config\ScopePool
*/
protected $_sectionPool;
protected $_scopePool;

/**
* @param \Magento\Core\Model\Config\SectionPool $sectionPool
* @param \Magento\App\Config\ScopePool $scopePool
*/
public function __construct(\Magento\Core\Model\Config\SectionPool $sectionPool)
public function __construct(\Magento\App\Config\ScopePool $scopePool)
{
$this->_sectionPool = $sectionPool;
$this->_scopePool = $scopePool;
}

/**
Expand All @@ -51,7 +51,7 @@ public function __construct(\Magento\Core\Model\Config\SectionPool $sectionPool)
*/
public function getValue($path)
{
return $this->_sectionPool->getSection('default', null)->getValue($path);
return $this->_scopePool->getScope('default', null)->getValue($path);
}

/**
Expand All @@ -62,15 +62,15 @@ public function getValue($path)
*/
public function setValue($path, $value)
{
$this->_sectionPool->getSection('default', null)->setValue($path, $value);
$this->_scopePool->getScope('default', null)->setValue($path, $value);
}

/**
* Reinitialize configuration
*/
public function reinit()
{
$this->_sectionPool->clean();
$this->_scopePool->clean();
}

/**
Expand All @@ -81,6 +81,6 @@ public function reinit()
*/
public function isSetFlag($path)
{
return !!$this->_sectionPool->getSection('default', null)->getValue($path);
return !!$this->_scopePool->getScope('default', null)->getValue($path);
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Context extends \Magento\View\Element\Template\Context
* @param \Magento\View\LayoutInterface $layout
* @param \Magento\Event\ManagerInterface $eventManager
* @param \Magento\UrlInterface $urlBuilder
* @param \Magento\Core\Model\Translate $translator
* @param \Magento\TranslateInterface $translator
* @param \Magento\App\CacheInterface $cache
* @param \Magento\View\DesignInterface $design
* @param \Magento\Core\Model\Session $session
Expand Down Expand Up @@ -88,7 +88,7 @@ public function __construct(
\Magento\View\LayoutInterface $layout,
\Magento\Event\ManagerInterface $eventManager,
\Magento\UrlInterface $urlBuilder,
\Magento\Core\Model\Translate $translator,
\Magento\TranslateInterface $translator,
\Magento\App\CacheInterface $cache,
\Magento\View\DesignInterface $design,
\Magento\Core\Model\Session $session,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @method string getClass()
* @method string getLabel()
* @method string getTitle()
* @method string getDisabled()
* @method bool getDisabled()
* @method string getStyle()
* @method array getDataAttribute()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Custom extends \Magento\Core\Model\Config\Value
/**
* Writer of configuration storage
*
* @var \Magento\Core\Model\Config\Storage\WriterInterface
* @var \Magento\App\Config\Storage\WriterInterface
*/
protected $_configWriter;

Expand All @@ -56,7 +56,7 @@ class Custom extends \Magento\Core\Model\Config\Value
* @param \Magento\Core\Model\Registry $registry
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\App\ConfigInterface $config
* @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter
* @param \Magento\App\Config\Storage\WriterInterface $configWriter
* @param \Magento\Core\Model\Resource\AbstractResource $resource
* @param \Magento\Data\Collection\Db $resourceCollection
* @param array $data
Expand All @@ -66,7 +66,7 @@ public function __construct(
\Magento\Core\Model\Registry $registry,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\App\ConfigInterface $config,
\Magento\Core\Model\Config\Storage\WriterInterface $configWriter,
\Magento\App\Config\Storage\WriterInterface $configWriter,
\Magento\Core\Model\Resource\AbstractResource $resource = null,
\Magento\Data\Collection\Db $resourceCollection = null,
array $data = array()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Usecustom extends \Magento\Core\Model\Config\Value
/**
* Writer of configuration storage
*
* @var \Magento\Core\Model\Config\Storage\WriterInterface
* @var \Magento\App\Config\Storage\WriterInterface
*/
protected $_configWriter;

Expand All @@ -44,7 +44,7 @@ class Usecustom extends \Magento\Core\Model\Config\Value
* @param \Magento\Core\Model\Registry $registry
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\App\ConfigInterface $config
* @param \Magento\Core\Model\Config\Storage\WriterInterface $configWriter
* @param \Magento\App\Config\Storage\WriterInterface $configWriter
* @param \Magento\Core\Model\Resource\AbstractResource $resource
* @param \Magento\Data\Collection\Db $resourceCollection
* @param array $data
Expand All @@ -54,7 +54,7 @@ public function __construct(
\Magento\Core\Model\Registry $registry,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\App\ConfigInterface $config,
\Magento\Core\Model\Config\Storage\WriterInterface $configWriter,
\Magento\App\Config\Storage\WriterInterface $configWriter,
\Magento\Core\Model\Resource\AbstractResource $resource = null,
\Magento\Data\Collection\Db $resourceCollection = null,
array $data = array()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class Encrypted
extends \Magento\Core\Model\Config\Value
implements \Magento\Core\Model\Config\Data\BackendModelInterface
implements \Magento\App\Config\Data\ProcessorInterface
{
/**
* @var \Magento\Encryption\EncryptorInterface
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Backend/Model/Locale/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Manager
protected $_authSession;

/**
* @var \Magento\Core\Model\Translate
* @var \Magento\TranslateInterface
*/
protected $_translator;

Expand All @@ -55,12 +55,12 @@ class Manager
*
* @param \Magento\Backend\Model\Session $session
* @param \Magento\Backend\Model\Auth\Session $authSession
* @param \Magento\Core\Model\Translate $translator
* @param \Magento\TranslateInterface $translator
*/
public function __construct(
\Magento\Backend\Model\Session $session,
\Magento\Backend\Model\Auth\Session $authSession,
\Magento\Core\Model\Translate $translator
\Magento\TranslateInterface $translator
) {
$this->_session = $session;
$this->_authSession = $authSession;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
/**
* Loader interface
*
* Magento
*
* NOTICE OF LICENSE
Expand All @@ -20,16 +18,27 @@
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Magento
* @package Magento_Backend
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
namespace Magento\Backend\Model;

namespace Magento\App\Config;

interface LoaderInterface
class Translate extends \Magento\Translate implements \Magento\TranslateInterface
{
/**
* Load configuration for current scope
* @inheritdoc
*/
public function load();
public function init($area = null, $initParams = null, $forceReload = false)
{
parent::init($area, $initParams, $forceReload);
$scope = null;
if ($this->getConfig(self::CONFIG_KEY_AREA) == \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) {
$scope = 'admin';
}
$this->_translateInline = $this->getInlineObject($initParams)->isAllowed($scope);
return $this;
}

}
18 changes: 17 additions & 1 deletion app/code/Magento/Backend/Model/Translate/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
namespace Magento\Backend\Model\Translate;

class Inline extends \Magento\Core\Model\Translate\Inline
class Inline extends \Magento\Translate\Inline
{
/**
* Return URL for ajax requests
Expand All @@ -40,4 +40,20 @@ protected function _getAjaxUrl()
{
return $this->_url->getUrl(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE . '/ajax/translate');
}

/**
* Replace translation templates with HTML fragments
*
* @param array|string $body
* @param bool $isJson
* @return $this
*/
public function processResponseBody(&$body, $isJson = false)
{
if (!$this->isAllowed()) {
$this->_stripInlineTranslations($body);
return $this;
}
return parent::processResponseBody($body, $isJson);
}
}
30 changes: 22 additions & 8 deletions app/code/Magento/Backend/Model/Translate/Inline/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,43 @@
*/
namespace Magento\Backend\Model\Translate\Inline;

class Config implements \Magento\Core\Model\Translate\Inline\ConfigInterface
class Config implements \Magento\Translate\Inline\ConfigInterface
{
/**
* @var \Magento\Backend\App\ConfigInterface
*/
protected $_config;

/**
* @var \Magento\Core\Helper\Data
*/
protected $_helper;

/**
* @param \Magento\Backend\App\ConfigInterface $config
* @param \Magento\Core\Helper\Data $helper
*/
public function __construct(\Magento\Backend\App\ConfigInterface $config)
{
public function __construct(
\Magento\Backend\App\ConfigInterface $config,
\Magento\Core\Helper\Data $helper
) {
$this->_config = $config;
$this->_helper = $helper;
}

/**
* Check whether inline translation is enabled
*
* @param int|null $store
* @return bool
* @inheritdoc
*/
public function isActive($store = null)
public function isActive($scope = null)
{
return $this->_config->isSetFlag('dev/translate_inline/active_admin');
}

/**
* @inheritdoc
*/
public function isDevAllowed($scope = null)
{
return $this->_helper->isDevAllowed($scope);
}
}
Loading

0 comments on commit 271615a

Please sign in to comment.