Permalink
Browse files

2.0.0.0-dev50

* Modularity improvements:
  * Cleavage of Adminhtml module
    * Moved Sales, Catalog, Tax-related logic to respective modules
    * Moved Action, Cache, Ajax, Dashboard, Index, Json, Rating, Sitemap, Survey, UrlRewrite from root of Adminhtml Controller folder
  * View abstraction was moved into library
  * Eliminated dependency in Magento\Data\Form from Magento\Core module
  * Eliminated Magento\Media module
* Themes update:
  * Templates and layout updates are updated in Cms, Contacts, Core, Directory, GoogleCheckout, Page, Payment, PaypalUk, Paypal, Rating, Review, Rss,Sales, Widget modules, old files moved to magento_backup theme
* Layout improvements:
  * Removed page type hierarchy and page fragment types
  * No direct code execution: methods addColumnRender, addRenderer, addToParentGroup usages as action nodes were eliminated
* Fixed bugs:
  * Impossible to add image using WYSIWYG
  * Legacy static test ObsoleteCodeTest::testPhpFiles produced false-positive results
  * Incorrect copyright information
  • Loading branch information...
magento-team committed Nov 1, 2013
1 parent 8478eac commit cc63630ec5c248b655b33937e27008c820910cb5
Showing 2,831 changed files with 97,337 additions and 88,844 deletions.
View
@@ -1,3 +1,22 @@
+2.0.0.0-dev50
+=============
+* Modularity improvements:
+ * Cleavage of Adminhtml module
+ * Moved Sales, Catalog, Tax-related logic to respective modules
+ * Moved Action, Cache, Ajax, Dashboard, Index, Json, Rating, Sitemap, Survey, UrlRewrite from root of Adminhtml Controller folder
+ * View abstraction was moved into library
+ * Eliminated dependency in Magento\Data\Form from Magento\Core module
+ * Eliminated Magento\Media module
+* Themes update:
+ * Templates and layout updates are updated in Cms, Contacts, Core, Directory, GoogleCheckout, Page, Payment, PaypalUk, Paypal, Rating, Review, Rss,Sales, Widget modules, old files moved to magento_backup theme
+* Layout improvements:
+ * Removed page type hierarchy and page fragment types
+ * No direct code execution: methods addColumnRender, addRenderer, addToParentGroup usages as action nodes were eliminated
+* Fixed bugs:
+ * Impossible to add image using WYSIWYG
+ * Legacy static test ObsoleteCodeTest::testPhpFiles produced false-positive results
+ * Incorrect copyright information
+
2.0.0.0-dev49
=============
* Various improvements:
@@ -62,7 +62,7 @@ public function markAsReadAction()
$this->_redirectReferer();
return;
}
- $this->_redirect('*/*/');
+ $this->_redirect('adminhtml/*/');
}
/**
@@ -113,7 +113,7 @@ public function massMarkAsReadAction()
);
}
}
- $this->_redirect('*/*/');
+ $this->_redirect('adminhtml/*/');
}
public function removeAction()
@@ -123,7 +123,7 @@ public function removeAction()
->load($id);
if (!$model->getId()) {
- $this->_redirect('*/*/');
+ $this->_redirect('adminhtml/*/');
return ;
}
@@ -141,10 +141,10 @@ public function removeAction()
);
}
- $this->_redirect('*/*/');
+ $this->_redirect('adminhtml/*/');
return;
}
- $this->_redirect('*/*/');
+ $this->_redirect('adminhtml/*/');
}
public function massRemoveAction()
@@ -0,0 +1,60 @@
+<?php
+/**
+ * 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.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-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 license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * 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_Adminhtml
+ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+
+/**
+ * Adminhtml Survey Action
+ *
+ * @category Magento
+ * @package Magento_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+namespace Magento\AdminNotification\Controller\Adminhtml;
+
+class Survey extends \Magento\Backend\Controller\Adminhtml\Action
+{
+ /**
+ * Index Action
+ *
+ */
+ public function indexAction()
+ {
+ if ($this->getRequest()->getParam('isAjax', false)) {
+ $this->_objectManager->get('Magento\AdminNotification\Model\Survey')->saveSurveyViewed(true);
+ }
+ $this->getResponse()->setBody(\Zend_Json::encode(array('survey_decision_saved' => 1)));
+ }
+
+ /**
+ * Check if user has enough privileges
+ *
+ * @return boolean
+ */
+ protected function _isAllowed()
+ {
+ return $this->_authorization->isAllowed(null);
+ }
+}
@@ -56,14 +56,14 @@ protected function _construct()
*/
public function getFlushStorageUrl()
{
- return $this->getUrl('*/*/flushAll');
+ return $this->getUrl('adminhtml/*/flushAll');
}
/**
* Get url for clean cache storage
*/
public function getFlushSystemUrl()
{
- return $this->getUrl('*/*/flushSystem');
+ return $this->getUrl('adminhtml/*/flushSystem');
}
}
@@ -30,11 +30,11 @@ class Additional extends \Magento\Adminhtml\Block\Template
{
public function getCleanImagesUrl()
{
- return $this->getUrl('*/*/cleanImages');
+ return $this->getUrl('adminhtml/*/cleanImages');
}
public function getCleanMediaUrl()
{
- return $this->getUrl('*/*/cleanMedia');
+ return $this->getUrl('adminhtml/*/cleanMedia');
}
}
@@ -1,232 +0,0 @@
-<?php
-/**
- * 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.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-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 license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * 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_Adminhtml
- * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Category abstract block
- *
- * @category Magento
- * @package Magento_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Adminhtml\Block\Catalog\Category;
-
-class AbstractCategory extends \Magento\Backend\Block\Template
-{
- /**
- * Core registry
- *
- * @var \Magento\Core\Model\Registry
- */
- protected $_coreRegistry = null;
-
- /**
- * @var \Magento\Catalog\Model\Resource\Category\Tree
- */
- protected $_categoryTree;
-
- /**
- * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree
- * @param \Magento\Core\Helper\Data $coreData
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Core\Model\Registry $registry
- * @param array $data
- */
- public function __construct(
- \Magento\Catalog\Model\Resource\Category\Tree $categoryTree,
- \Magento\Core\Helper\Data $coreData,
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Core\Model\Registry $registry,
- array $data = array()
- ) {
- $this->_categoryTree = $categoryTree;
- $this->_coreRegistry = $registry;
- parent::__construct($coreData, $context, $data);
- }
-
- /**
- * Retrieve current category instance
- *
- * @return \Magento\Catalog\Model\Category
- */
- public function getCategory()
- {
- return $this->_coreRegistry->registry('category');
- }
-
- public function getCategoryId()
- {
- if ($this->getCategory()) {
- return $this->getCategory()->getId();
- }
- return \Magento\Catalog\Model\Category::TREE_ROOT_ID;
- }
-
- public function getCategoryName()
- {
- return $this->getCategory()->getName();
- }
-
- public function getCategoryPath()
- {
- if ($this->getCategory()) {
- return $this->getCategory()->getPath();
- }
- return \Magento\Catalog\Model\Category::TREE_ROOT_ID;
- }
-
- public function hasStoreRootCategory()
- {
- $root = $this->getRoot();
- if ($root && $root->getId()) {
- return true;
- }
- return false;
- }
-
- public function getStore()
- {
- $storeId = (int) $this->getRequest()->getParam('store');
- return $this->_storeManager->getStore($storeId);
- }
-
- public function getRoot($parentNodeCategory=null, $recursionLevel=3)
- {
- if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
- return $this->getNode($parentNodeCategory, $recursionLevel);
- }
- $root = $this->_coreRegistry->registry('root');
- if (is_null($root)) {
- $storeId = (int) $this->getRequest()->getParam('store');
-
- if ($storeId) {
- $store = $this->_storeManager->getStore($storeId);
- $rootId = $store->getRootCategoryId();
- }
- else {
- $rootId = \Magento\Catalog\Model\Category::TREE_ROOT_ID;
- }
-
- $tree = $this->_categoryTree->load(null, $recursionLevel);
-
- if ($this->getCategory()) {
- $tree->loadEnsuredNodes($this->getCategory(), $tree->getNodeById($rootId));
- }
-
- $tree->addCollectionData($this->getCategoryCollection());
-
- $root = $tree->getNodeById($rootId);
-
- if ($root && $rootId != \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $root->setIsVisible(true);
- }
- elseif($root && $root->getId() == \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $root->setName(__('Root'));
- }
-
- $this->_coreRegistry->register('root', $root);
- }
-
- return $root;
- }
-
- /**
- * Get and register categories root by specified categories IDs
- *
- * IDs can be arbitrary set of any categories ids.
- * Tree with minimal required nodes (all parents and neighbours) will be built.
- * If ids are empty, default tree with depth = 2 will be returned.
- *
- * @param array $ids
- */
- public function getRootByIds($ids)
- {
- $root = $this->_coreRegistry->registry('root');
- if (null === $root) {
- $ids = $this->_categoryTree->getExistingCategoryIdsBySpecifiedIds($ids);
- $tree = $this->_categoryTree->loadByIds($ids);
- $rootId = \Magento\Catalog\Model\Category::TREE_ROOT_ID;
- $root = $tree->getNodeById($rootId);
- if ($root && $rootId != \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $root->setIsVisible(true);
- } else if($root && $root->getId() == \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $root->setName(__('Root'));
- }
-
- $tree->addCollectionData($this->getCategoryCollection());
- $this->_coreRegistry->register('root', $root);
- }
- return $root;
- }
-
- public function getNode($parentNodeCategory, $recursionLevel=2)
- {
- $nodeId = $parentNodeCategory->getId();
- $parentId = $parentNodeCategory->getParentId();
-
- $node = $this->_categoryTree->loadNode($nodeId);
- $node->loadChildren($recursionLevel);
-
- if ($node && $nodeId != \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $node->setIsVisible(true);
- } elseif($node && $node->getId() == \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
- $node->setName(__('Root'));
- }
-
- $this->_categoryTree->addCollectionData($this->getCategoryCollection());
-
- return $node;
- }
-
- public function getSaveUrl(array $args = array())
- {
- $params = array('_current'=>true);
- $params = array_merge($params, $args);
- return $this->getUrl('*/*/save', $params);
- }
-
- public function getEditUrl()
- {
- return $this->getUrl("*/catalog_category/edit", array('_current'=>true, 'store'=>null, '_query'=>false, 'id'=>null, 'parent'=>null));
- }
-
- /**
- * Return ids of root categories as array
- *
- * @return array
- */
- public function getRootIds()
- {
- $ids = $this->getData('root_ids');
- if (is_null($ids)) {
- $ids = array();
- foreach ($this->_storeManager->getGroups() as $store) {
- $ids[] = $store->getRootCategoryId();
- }
- $this->setData('root_ids', $ids);
- }
- return $ids;
- }
-}
Oops, something went wrong.

0 comments on commit cc63630

Please sign in to comment.