Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
guoguolong committed Oct 26, 2013
2 parents f3298d2 + 8478eac commit d22107a
Show file tree
Hide file tree
Showing 1,884 changed files with 63,839 additions and 24,990 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,26 @@
2.0.0.0-dev49
=============
* Various improvements:
* Unified Area configuration
* Moved EventManager to Magento\Event lib component
* Moved FrontController, Routers, Base Actions to Magento\App
* Created Magento\App component in library
* Declared public interfaces for View component into library
* Plushe theme is set as the default theme
* Refactor the Blacklist Pattern in the Integrity Test Suite's ClassesTest to Replace Blacklist.php Files
* Removed JavaScript unit test TreeSuggestTest.prototype.testBind as obsolete
* Introduced ability to register a template engine to process template files having certain extension
* Removed support of the Twig template engine along with the corresponding component from the library
* Removed layout flag that forced template blocks to output rendered content directly to a browser bypassing the response object
* Moved out responsibility of rendering template debugging hints from the template block to the plugin and decorator for a template engine
* Fixed bugs:
* Fixed inability to create product if multiple attributes are assigned to attribute set
* Fixed inability to create a new widget instance
* Fixed error on Customers Segments Conditions tab while the 'Number of Orders' condition is chosen
* Fixed blank page when placing order via Ogone
* Fixed various UI issues in Admin Panel with layout, aligning, buttons and fields
* Fixed static tests failing to verify themes files

2.0.0.0-dev48
=============
* Various improvements:
Expand Down
Expand Up @@ -42,15 +42,15 @@ class Collection
protected $_countBySeverity = array();

/**
* @param \Magento\Core\Model\Event\Manager $eventManager
* @param \Magento\Event\ManagerInterface $eventManager
* @param \Magento\Core\Model\Logger $logger
* @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
* @param \Magento\Core\Model\EntityFactory $entityFactory
* @param \Magento\AdminNotification\Model\System\MessageList $messageList
* @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
*/
public function __construct(
\Magento\Core\Model\Event\Manager $eventManager,
\Magento\Event\ManagerInterface $eventManager,
\Magento\Core\Model\Logger $logger,
\Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
\Magento\Core\Model\EntityFactory $entityFactory,
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdminNotification/Model/Survey.php
Expand Up @@ -54,17 +54,17 @@ class Survey
protected $_flagFactory;

/**
* @var \Magento\Core\Controller\Request\Http
* @var \Magento\App\RequestInterface
*/
protected $_request;

/**
* @param \Magento\Core\Model\FlagFactory $flagFactory
* @param \Magento\Core\Controller\Request\Http $request
* @param \Magento\App\RequestInterface $request
*/
public function __construct(
\Magento\Core\Model\FlagFactory $flagFactory,
\Magento\Core\Controller\Request\Http $request
\Magento\App\RequestInterface $request
) {
$this->_request = $request;
$this->_flagFactory = $flagFactory;
Expand Down
Expand Up @@ -27,7 +27,7 @@ class Baseurl
implements \Magento\AdminNotification\Model\System\MessageInterface
{
/**
* @var \Magento\Core\Model\UrlInterface
* @var \Magento\UrlInterface
*/
protected $_urlBuilder;

Expand All @@ -49,13 +49,13 @@ class Baseurl
/**
* @param \Magento\Core\Model\Config $config
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Core\Model\UrlInterface $urlBuilder
* @param \Magento\UrlInterface $urlBuilder
* @param \Magento\Core\Model\Config\ValueFactory $configValueFactory
*/
public function __construct(
\Magento\Core\Model\Config $config,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\Core\Model\UrlInterface $urlBuilder,
\Magento\UrlInterface $urlBuilder,
\Magento\Core\Model\Config\ValueFactory $configValueFactory
) {
$this->_urlBuilder = $urlBuilder;
Expand Down
Expand Up @@ -27,7 +27,7 @@ class CacheOutdated
implements \Magento\AdminNotification\Model\System\MessageInterface
{
/**
* @var \Magento\Core\Model\UrlInterface
* @var \Magento\UrlInterface
*/
protected $_urlBuilder;

Expand All @@ -43,12 +43,12 @@ class CacheOutdated

/**
* @param \Magento\AuthorizationInterface $authorization
* @param \Magento\Core\Model\UrlInterface $urlBuilder
* @param \Magento\UrlInterface $urlBuilder
* @param \Magento\Core\Model\Cache\TypeListInterface $cacheTypeList
*/
public function __construct(
\Magento\AuthorizationInterface $authorization,
\Magento\Core\Model\UrlInterface $urlBuilder,
\Magento\UrlInterface $urlBuilder,
\Magento\Core\Model\Cache\TypeListInterface $cacheTypeList
) {
$this->_authorization = $authorization;
Expand Down
Expand Up @@ -37,7 +37,7 @@ class Survey
protected $_authorization;

/**
* @var \Magento\Core\Model\UrlInterface
* @var \Magento\UrlInterface
*/
protected $_urlBuilder;

Expand All @@ -49,13 +49,13 @@ class Survey
/**
* @param \Magento\Backend\Model\Auth\Session $authSession
* @param \Magento\AuthorizationInterface $authorization
* @param \Magento\Core\Model\UrlInterface $urlBuilder
* @param \Magento\UrlInterface $urlBuilder
* @param \Magento\AdminNotification\Model\Survey $survey
*/
public function __construct(
\Magento\Backend\Model\Auth\Session $authSession,
\Magento\AuthorizationInterface $authorization,
\Magento\Core\Model\UrlInterface $urlBuilder,
\Magento\UrlInterface $urlBuilder,
\Magento\AdminNotification\Model\Survey $survey
) {
$this->_authorization = $authorization;
Expand Down
Expand Up @@ -45,15 +45,15 @@ class Image extends \Magento\Data\Form\Element\Image
* @param \Magento\Core\Helper\Data $coreData
* @param \Magento\Data\Form\Element\Factory $factoryElement
* @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
* @param \Magento\Core\Model\UrlInterface $urlBuilder
* @param \Magento\UrlInterface $urlBuilder
* @param array $attributes
*/
public function __construct(
\Magento\Core\Model\StoreManager $storeManager,
\Magento\Core\Helper\Data $coreData,
\Magento\Data\Form\Element\Factory $factoryElement,
\Magento\Data\Form\Element\CollectionFactory $factoryCollection,
\Magento\Core\Model\UrlInterface $urlBuilder,
\Magento\UrlInterface $urlBuilder,
$attributes = array()
) {
$this->_storeManager = $storeManager;
Expand Down
Expand Up @@ -49,8 +49,7 @@ protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $e

$from = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
$to = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
return __('from') . ' ' . $from
. ' '
. __('to') . ' ' . $to;
return __('<label class="label"><span>from</span></label>') . $from
. __('<label class="label"><span>to</span></label>') . $to;
}
}
Expand Up @@ -55,13 +55,13 @@ class Wysiwyg extends \Magento\Data\Form\Element\Textarea
protected $_wysiwygConfig;

/**
* @var \Magento\Core\Model\Layout
* @var \Magento\View\LayoutInterface
*/
protected $_layout;

/**
* @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
* @param \Magento\Core\Model\Layout $layout
* @param \Magento\View\LayoutInterface $layout
* @param \Magento\Core\Helper\Data $coreData
* @param \Magento\Data\Form\Element\Factory $factoryElement
* @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
Expand All @@ -71,7 +71,7 @@ class Wysiwyg extends \Magento\Data\Form\Element\Textarea
*/
public function __construct(
\Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
\Magento\Core\Model\Layout $layout,
\Magento\View\LayoutInterface $layout,
\Magento\Core\Helper\Data $coreData,
\Magento\Data\Form\Element\Factory $factoryElement,
\Magento\Data\Form\Element\CollectionFactory $factoryCollection,
Expand Down
Expand Up @@ -49,7 +49,7 @@ class Config
/**
* @var \Magento\Core\Model\App
*/
protected $_app;
protected $_storeManager;

/**
* @var \Magento\Core\Model\LocaleInterface
Expand Down Expand Up @@ -91,7 +91,7 @@ public function __construct(
$this->_configurableType = $configurableType;
$this->_coreRegistry = $coreRegistry;
$this->_catalogData = $catalogData;
$this->_app = $app;
$this->_storeManager = $app;
$this->_locale = $locale;
parent::__construct($coreData, $context, $data);
}
Expand Down Expand Up @@ -489,7 +489,7 @@ public function getParentTab()
*/
public function getApp()
{
return $this->_app;
return $this->_storeManager;
}

/**
Expand Down
Expand Up @@ -36,7 +36,7 @@
class Category extends \Magento\Data\Form\Element\Multiselect
{
/**
* @var \Magento\Core\Model\Layout
* @var \Magento\View\LayoutInterface
*/
protected $_layout;

Expand All @@ -58,7 +58,7 @@ class Category extends \Magento\Data\Form\Element\Multiselect
* @param \Magento\Data\Form\Element\Factory $factoryElement
* @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
* @param \Magento\Backend\Helper\Data $backendData
* @param \Magento\Core\Model\Layout $layout
* @param \Magento\View\LayoutInterface $layout
* @param array $attributes
*/
public function __construct(
Expand All @@ -67,7 +67,7 @@ public function __construct(
\Magento\Data\Form\Element\Factory $factoryElement,
\Magento\Data\Form\Element\CollectionFactory $factoryCollection,
\Magento\Backend\Helper\Data $backendData,
\Magento\Core\Model\Layout $layout,
\Magento\View\LayoutInterface $layout,
array $attributes = array()
) {
$this->_collectionFactory = $collectionFactory;
Expand Down
Expand Up @@ -42,20 +42,20 @@ class Gallery extends \Magento\Data\Form\Element\AbstractElement
protected $_storeManager;

/**
* @var \Magento\Core\Model\Layout
* @var \Magento\View\LayoutInterface
*/
protected $_layout;

/**
* @param \Magento\Core\Model\Layout $layout
* @param \Magento\View\LayoutInterface $layout
* @param \Magento\Core\Model\StoreManager $storeManager
* @param \Magento\Core\Helper\Data $coreData
* @param \Magento\Data\Form\Element\Factory $factoryElement
* @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
* @param array $attributes
*/
public function __construct(
\Magento\Core\Model\Layout $layout,
\Magento\View\LayoutInterface $layout,
\Magento\Core\Model\StoreManager $storeManager,
\Magento\Core\Helper\Data $coreData,
\Magento\Data\Form\Element\Factory $factoryElement,
Expand Down
Expand Up @@ -43,7 +43,7 @@ class Content
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Data\Form\Factory $formFactory
* @param \Magento\Core\Helper\Data $coreData
* @param \Magento\Core\Model\Event\Manager $eventManager
* @param \Magento\Event\ManagerInterface $eventManager
* @param \Magento\Core\Model\Registry $coreRegistry
* @param array $data
*/
Expand All @@ -52,7 +52,7 @@ public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Data\Form\Factory $formFactory,
\Magento\Core\Helper\Data $coreData,
\Magento\Core\Model\Event\Manager $eventManager,
\Magento\Event\ManagerInterface $eventManager,
\Magento\Core\Model\Registry $coreRegistry,
array $data = array()
) {
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Adminhtml/Block/Page/Head.php
Expand Up @@ -48,7 +48,7 @@ class Head extends \Magento\Page\Block\Html\Head
/**
* @param \Magento\Core\Model\Session $session
* @param \Magento\Core\Model\LocaleInterface $locale
* @param \Magento\Core\Model\Dir $dir
* @param \Magento\App\Dir $dir
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
* @param \Magento\Core\Helper\Data $coreData
Expand All @@ -62,7 +62,7 @@ class Head extends \Magento\Page\Block\Html\Head
public function __construct(
\Magento\Core\Model\Session $session,
\Magento\Core\Model\LocaleInterface $locale,
\Magento\Core\Model\Dir $dir,
\Magento\App\Dir $dir,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\Core\Helper\File\Storage\Database $fileStorageDatabase,
\Magento\Core\Helper\Data $coreData,
Expand Down
Expand Up @@ -127,7 +127,7 @@ public function addColumnRender($column, $block, $template, $type = null)
public function getItemRenderer($type)
{
$renderer = $this->getChildBlock($type) ?: $this->getChildBlock(self::DEFAULT_TYPE);
if (!$renderer instanceof \Magento\Core\Block) {
if (!$renderer instanceof \Magento\View\Element\BlockInterface) {
throw new \RuntimeException('Renderer for type "' . $type . '" does not exist.');
}
foreach ($this->_columnRenders as $columnType => $columnRenderer) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Adminhtml/Controller/Customer.php
Expand Up @@ -846,7 +846,7 @@ public function viewfileAction()
return $this->norouteAction();
}

$path = $this->_objectManager->get('Magento\Core\Model\Dir')->getDir('media') . DS . 'customer';
$path = $this->_objectManager->get('Magento\App\Dir')->getDir('media') . DS . 'customer';

/** @var \Magento\Filesystem $filesystem */
$filesystem = $this->_objectManager->get('Magento\Filesystem');
Expand Down
Expand Up @@ -704,8 +704,8 @@ protected function _createPdfPageFromImageString($imageString)
{
/** @var \Magento\Filesystem $filesystem */
$filesystem = $this->_objectManager->get('Magento\Filesystem');
/** @var $tmpDir \Magento\Core\Model\Dir */
$tmpDir = $this->_objectManager->get('Magento\Core\Model\Dir', $filesystem->getWorkingDirectory());
/** @var $tmpDir \Magento\App\Dir */
$tmpDir = $this->_objectManager->get('Magento\App\Dir', $filesystem->getWorkingDirectory());
$image = imagecreatefromstring($imageString);
if (!$image) {
return false;
Expand All @@ -716,7 +716,7 @@ protected function _createPdfPageFromImageString($imageString)
$page = new \Zend_Pdf_Page($xSize, $ySize);

imageinterlace($image, 0);
$tmpFileName = $tmpDir->getDir(\Magento\Core\Model\Dir::TMP) . 'shipping_labels_'
$tmpFileName = $tmpDir->getDir(\Magento\App\Dir::TMP) . 'shipping_labels_'
. uniqid(mt_rand()) . time() . '.png';
imagepng($image, $tmpFileName);
$pdfImage = \Zend_Pdf_Image::imageWithPath($tmpFileName);
Expand All @@ -728,7 +728,7 @@ protected function _createPdfPageFromImageString($imageString)
/**
* Return grid with shipping items for Ajax request
*
* @return \Magento\Core\Controller\Response\Http
* @return \Magento\App\ResponseInterface
*/
public function getShippingItemsGridAction()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Adminhtml/Controller/Sitemap.php
Expand Up @@ -175,9 +175,9 @@ public function saveAction()
$fileName = $model->getSitemapFilename();

$filesystem->setWorkingDirectory(
$this->_objectManager->get('Magento\Core\Model\Dir')->getDir() . $model->getSitemapPath()
$this->_objectManager->get('Magento\App\Dir')->getDir() . $model->getSitemapPath()
);
$filePath = $this->_objectManager->get('Magento\Core\Model\Dir')->getDir()
$filePath = $this->_objectManager->get('Magento\App\Dir')->getDir()
. $model->getSitemapPath() . DS . $fileName;

if ($fileName && $filesystem->isFile($filePath)) {
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Adminhtml/Controller/System/Backup.php
Expand Up @@ -143,7 +143,7 @@ public function createAction()
}

if ($type != \Magento\Backup\Helper\Data::TYPE_DB) {
$backupManager->setRootDir($this->_objectManager->get('Magento\Core\Model\Dir')->getDir())
$backupManager->setRootDir($this->_objectManager->get('Magento\App\Dir')->getDir())
->addIgnorePaths($helper->getBackupIgnorePaths());
}

Expand Down Expand Up @@ -274,7 +274,7 @@ public function rollbackAction()

if ($type != \Magento\Backup\Helper\Data::TYPE_DB) {

$backupManager->setRootDir($this->_objectManager->get('Magento\Core\Model\Dir')->getDir())
$backupManager->setRootDir($this->_objectManager->get('Magento\App\Dir')->getDir())
->addIgnorePaths($helper->getRollbackIgnorePaths());

if ($this->getRequest()->getParam('use_ftp', false)) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Adminhtml/Controller/System/Store.php
Expand Up @@ -471,7 +471,7 @@ protected function _backupDatabase($failPath, $arguments=array())
$backup = $this->_objectManager->create('Magento\Backup\Model\Backup')
->setTime(time())
->setType('db')
->setPath($this->_objectManager->get('Magento\Core\Model\Dir')->getDir('var') . DS . 'backups');
->setPath($this->_objectManager->get('Magento\App\Dir')->getDir('var') . DS . 'backups');

$backupDb->createBackup($backup);
$this->_getSession()->addSuccess(__('The database was backed up.'));
Expand Down

0 comments on commit d22107a

Please sign in to comment.