Skip to content

Commit

Permalink
Update as of 5/23/2012
Browse files Browse the repository at this point in the history
* Published performance tests (`dev/tests/performance`)
* Implemented support of ImageMagick library for processing images
* Distinguished "Page Fragments" and "Pages" in layout handles declaration
* Reduced performance drop caused by introducing containers
* Implemented Magento_Data_Structure library which is used to handle structure of layout elements
* Fixed some issues:
  * Fixed error on saving newsletter template
  * Fixed some checkout issues:
    * order is not placed if 3D Secure is used
    * transaction is not created if PayPal Standard is used
    * "Purchase Order Number" field is not displayed
    * failed checkout on concurrent user requests
  * Fixed incorrect shipment creation: shipping and tracking information was not saved
  * Fixed broken category page when "Use Flat Catalog Product" is enabled
  * Fixed incorrect applying of discount to a sub-product, if more two rules are being applied
  * Fixed broken "Edit" product link in Wishlist and Shopping Cart
  * Fixed broken installation when "pub/media" is not writable
  * Fixed resetting Design Theme configuration option when User-Agent Exception is added
  * Fixed error while running unit tests, when Zend Framework is installed with PEAR
  * Fixed incorrect processing of "before" and "after" layout instructions in case, when the instruction refers to a node, which is not processed yet
  * Fixed broken import/export functionality
  * Fixed broken Web Services pages in Admin Panel
  * Fixed broken creation of URL rewrite
  * Fixed error in Weee module caused broken view pages of configurable products with recurring profile or downloadable/bundle product
  * Fixed error on submitting XML Connect application
  * Fixed broken design when database is used as media storage
* Other small changes
  • Loading branch information
magento-team committed May 25, 2012
1 parent f8dac8f commit b8f3ea4
Show file tree
Hide file tree
Showing 217 changed files with 9,603 additions and 3,377 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.markdown
@@ -1,3 +1,33 @@
Update as of 5/23/2012
======================
* Published performance tests (`dev/tests/performance`)
* Implemented support of ImageMagick library for processing images
* Distinguished "Page Fragments" and "Pages" in layout handles declaration
* Reduced performance drop caused by introducing containers
* Implemented Magento_Data_Structure library which is used to handle structure of layout elements
* Fixed some issues:
* Fixed error on saving newsletter template
* Fixed some checkout issues:
* order is not placed if 3D Secure is used
* transaction is not created if PayPal Standard is used
* "Purchase Order Number" field is not displayed
* failed checkout on concurrent user requests
* Fixed incorrect shipment creation: shipping and tracking information was not saved
* Fixed broken category page when "Use Flat Catalog Product" is enabled
* Fixed incorrect applying of discount to a sub-product, if more two rules are being applied
* Fixed broken "Edit" product link in Wishlist and Shopping Cart
* Fixed broken installation when "pub/media" is not writable
* Fixed resetting Design Theme configuration option when User-Agent Exception is added
* Fixed error while running unit tests, when Zend Framework is installed with PEAR
* Fixed incorrect processing of "before" and "after" layout instructions in case, when the instruction refers to a node, which is not processed yet
* Fixed broken import/export functionality
* Fixed broken Web Services pages in Admin Panel
* Fixed broken creation of URL rewrite
* Fixed error in Weee module caused broken view pages of configurable products with recurring profile or downloadable/bundle product
* Fixed error on submitting XML Connect application
* Fixed broken design when database is used as media storage
* Other small changes

Update as of 5/09/2012
======================
* Implemented configuration option that enables the page types hierarchy usage during the page generation
Expand Down
6 changes: 3 additions & 3 deletions app/Mage.php
Expand Up @@ -415,7 +415,7 @@ public static function dispatchEvent($name, array $data = array())
{
Magento_Profiler::start('EVENT:' . $name);
$result = self::app()->dispatchEvent($name, $data);
Magento_Profiler::stop('DISPATCH EVENT:'.$name);
Magento_Profiler::stop('EVENT:'.$name);
return $result;
}

Expand Down Expand Up @@ -688,8 +688,8 @@ public static function run($code = '', $type = 'store', $options = array())
*/
protected static function _setIsInstalled($options = array())
{
if (isset($options['is_installed']) && $options['is_installed']) {
self::$_isInstalled = true;
if (isset($options['is_installed'])) {
self::$_isInstalled = (bool) $options['is_installed'];
}
}

Expand Down
Expand Up @@ -27,7 +27,7 @@
-->
<layout version="0.1.0">
<moneybookers_processing_payment translate="label" type="page" parent="checkout_onepage_paymentmethod">
<moneybookers_processing_payment translate="label" type="page" parent="default">
<label>Moneybookers Payment</label>
<reference name="root">
<action method="setTemplate"><template>1column.phtml</template></action>
Expand Down
11 changes: 7 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
Expand Up @@ -57,6 +57,9 @@ protected function _prepareLayout()
->setSortOrder()
->load();

$tabAttributesBlock = $this->getLayout()->createBlock(
$this->getAttributeTabBlock(), 'adminhtml.catalog.product.edit.tab.attributes'
);
foreach ($groupCollection as $group) {
$attributes = $product->getAttributes($group->getId(), true);
// do not add groups without attributes
Expand All @@ -73,10 +76,10 @@ protected function _prepareLayout()

$this->addTab('group_'.$group->getId(), array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__($group->getAttributeGroupName()),
'content' => $this->_translateHtml($this->getLayout()->createBlock($this->getAttributeTabBlock(),
'adminhtml.catalog.product.edit.tab.attributes')->setGroup($group)
->setGroupAttributes($attributes)
->toHtml()),
'content' => $this->_translateHtml($tabAttributesBlock->setGroup($group)
->setGroupAttributes($attributes)
->toHtml()
),
));
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/System/Config/Form.php
Expand Up @@ -292,7 +292,7 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP

$id = $section->getName() . '_' . $group->getName() . '_' . $fieldPrefix . $e->getName();

if (isset($this->_configData[$path])) {
if (array_key_exists($path, $this->_configData)) {
$data = $this->_configData[$path];
$inherit = false;
} else {
Expand Down
Expand Up @@ -148,6 +148,7 @@ public function getArrayRows()
$rowColumnValues = array();
foreach ($row as $key => $value) {
$row[$key] = $this->escapeHtml($value);
$rowColumnValues[$this->_getCellInputElementId($rowId, $key)] = $row[$key];
}
$row['_id'] = $rowId;
$row['column_values'] = $rowColumnValues;
Expand Down
23 changes: 16 additions & 7 deletions app/code/core/Mage/Adminhtml/Block/Urlrewrite.php
Expand Up @@ -27,8 +27,11 @@
/**
* Block for Urlrewrites grid container
*
* @category Mage
* @package Mage_Adminhtml
* @method Mage_Adminhtml_Block_Urlrewrite setSelectorBlock(Mage_Adminhtml_Block_Urlrewrite_Selector $value)
* @method null|Mage_Adminhtml_Block_Urlrewrite_Selector getSelectorBlock()
*
* @category Mage
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Urlrewrite extends Mage_Adminhtml_Block_Widget_Grid_Container
Expand Down Expand Up @@ -59,12 +62,18 @@ public function __construct()
*/
public function getCreateUrl()
{
if (Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector')) {
$modes = array_keys(Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector')->getModes());
$url = $this->getUrl('*/*/edit') . array_shift($modes);
} else {
$url = $this->getUrl('*/*/edit');
$url = $this->getUrl('*/*/edit');

$selectorBlock = $this->getSelectorBlock();
if ($selectorBlock === null) {
$selectorBlock = Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector');
}

if ($selectorBlock) {
$modes = array_keys($selectorBlock->getModes());
$url .= reset($modes);
}

return $url;
}
}
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php
Expand Up @@ -156,7 +156,7 @@ protected function _setFormChild()
{
$helper = Mage::helper('Mage_Adminhtml_Helper_Data');

$this->setChild('form', Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Edit_Form'));
$this->setChild('form', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Urlrewrite_Edit_Form'));
if ($this->getUrlrewriteId()) {
$this->_addButton('reset', array(
'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset'),
Expand Down
4 changes: 3 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php
Expand Up @@ -78,7 +78,9 @@ public function __construct()

protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller && $this->_mode) {
if ($this->_blockGroup && $this->_controller && $this->_mode
&& !$this->_layout->getChildName($this->_nameInLayout, 'form')
) {
$this->setChild(
'form',
$this->getLayout()->createBlock($this->_blockGroup
Expand Down
@@ -0,0 +1,57 @@
<?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 Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


/**
* System config image field backend model for Zend PDF generator
*
* @category Mage
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Model_System_Config_Backend_Image_Adapter extends Mage_Core_Model_Config_Data
{
/**
* Checks if choosen image adapter available
*
* @throws Mage_Core_Exception if some of adapter dipendencies was not loaded
* @return Mage_Adminhtml_Model_System_Config_Backend_File
*/
protected function _beforeSave()
{
$value = $this->getValue();

$adapter = Varien_Image_Adapter::factory($value);
try {
$adapter->checkDependencies();
} catch (Exception $e) {
$message = Mage::helper('Mage_Core_Helper_Data')->__('Unable to use choosen image adapter because of some dependies are missed');
throw new Mage_Core_Exception($message);
}

return $this;
}
}
@@ -0,0 +1,42 @@
<?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 Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


class Mage_Adminhtml_Model_System_Config_Source_Image_Adapter
{
/**
* Return hash of image adapter codes and labels
*
* @return array
*/
public function toOptionArray()
{
return array(
Varien_Image_Adapter::ADAPTER_IM => Mage::helper('Mage_Adminhtml_Helper_Data')->__('ImageMagick'),
Varien_Image_Adapter::ADAPTER_GD2 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('PHP Gd 2'),
);
}
}
Expand Up @@ -186,7 +186,8 @@ public function thumbnailAction()
$file = Mage::helper('Mage_Cms_Helper_Wysiwyg_Images')->idDecode($file);
$thumb = $this->getStorage()->resizeOnTheFly($file);
if ($thumb !== false) {
$image = Varien_Image_Adapter::factory('GD2');
$adapter = Mage::helper('Mage_Core_Helper_Data')->getImageAdapterType();
$image = Varien_Image_Adapter::factory($adapter);
$image->open($thumb);
$image->display();
} else {
Expand Down
Expand Up @@ -43,12 +43,13 @@ public function directiveAction()
$directive = $this->getRequest()->getParam('___directive');
$directive = Mage::helper('Mage_Core_Helper_Data')->urlDecode($directive);
$url = Mage::getModel('Mage_Core_Model_Email_Template_Filter')->filter($directive);
$adapter = Mage::helper('Mage_Core_Helper_Data')->getImageAdapterType();
try {
$image = Varien_Image_Adapter::factory('GD2');
$image = Varien_Image_Adapter::factory($adapter);
$image->open($url);
$image->display();
} catch (Exception $e) {
$image = Varien_Image_Adapter::factory('GD2');
$image = Varien_Image_Adapter::factory($adapter);
$image->open(Mage::getSingleton('Mage_Cms_Model_Wysiwyg_Config')->getSkinImagePlaceholderUrl());
$image->display();
/*
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
Expand Up @@ -230,7 +230,7 @@ Layout handle for grouped products
</adminhtml_catalog_product_supergroup>

<adminhtml_catalog_product_supergroupgridonly>
<container name="root" label="Root">
<container name="root" label="Root" output="1">
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group" name="catalog.product.edit.tab.super.group" />
</container>
</adminhtml_catalog_product_supergroupgridonly>
Expand All @@ -241,7 +241,7 @@ Layout handle for configurable products
<adminhtml_catalog_product_configurable_new>
<remove name="product_tabs"/>
<reference name="left">
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable" name="configurable_product_tabs"></block>
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable" name="configurable_product_tabs"/>
</reference>
</adminhtml_catalog_product_configurable_new>

Expand Down
Expand Up @@ -29,8 +29,7 @@
<div class="entry-edit"><div class="entry-edit-head"><h4><?php echo $this->helper('Mage_Sales_Helper_Data')->__('Customer\'s Current Activities') ?></h4></div></div>
<div class="create-order-sidebar-container">
<?php echo $this->getChildHtml('top_button'); ?>
<?php foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $_child): ?>
<?php $_alias = $_child->getBlockAlias(); ?>
<?php foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $_alias => $_child): ?>
<?php if ($_alias != 'top_button' && $_alias != 'bottom_button'): ?>
<div id="order-sidebar_<?php echo $_alias ?>">
<?php if($this->canDisplay($_child)): ?>
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Block/Adminhtml/Attribute.php
Expand Up @@ -40,7 +40,7 @@ public function __construct()
{
parent::__construct();

$this->_blockGroup = 'api2';
$this->_blockGroup = 'Mage_Api2';
$this->_controller = 'adminhtml_attribute';
$this->_headerText = $this->__('REST Attributes');
$this->_removeButton('add');
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit.php
Expand Up @@ -39,7 +39,7 @@ class Mage_Api2_Block_Adminhtml_Attribute_Edit extends Mage_Adminhtml_Block_Widg
public function __construct()
{
$this->_objectId = 'id';
$this->_blockGroup = 'api2';
$this->_blockGroup = 'Mage_Api2';
$this->_controller = 'adminhtml_attribute';

parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Block/Adminhtml/Roles.php
Expand Up @@ -40,7 +40,7 @@ public function __construct()
{
parent::__construct();

$this->_blockGroup = 'api2';
$this->_blockGroup = 'Mage_Api2';
$this->_controller = 'adminhtml_roles';
$this->_headerText = Mage::helper('Mage_Adminhtml_Helper_Data')->__('REST Roles');

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php
Expand Up @@ -41,7 +41,7 @@ class Mage_Api2_Block_Adminhtml_Roles_Buttons extends Mage_Adminhtml_Block_Templ
public function __construct()
{
parent::__construct();
$this->setTemplate('api2/role/buttons.phtml');
$this->setTemplate('role/buttons.phtml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Model/Acl/Global/Role.php
Expand Up @@ -72,7 +72,7 @@ class Mage_Api2_Model_Acl_Global_Role extends Mage_Core_Model_Abstract
*/
protected function _construct()
{
$this->_init('Mage_Api2_Model_Acl_Global_Role');
$this->_init('Mage_Api2_Model_Resource_Acl_Global_Role');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Api2/Model/Acl/Global/Rule.php
Expand Up @@ -60,6 +60,6 @@ class Mage_Api2_Model_Acl_Global_Rule extends Mage_Core_Model_Abstract
*/
protected function _construct()
{
$this->_init('Mage_Api2_Model_Acl_Global_Rule');
$this->_init('Mage_Api2_Model_Resource_Acl_Global_Rule');
}
}
Expand Up @@ -42,7 +42,7 @@ class Mage_Authorizenet_Block_Directpost_Iframe extends Mage_Core_Block_Template
*/
protected function _prepareLayout()
{
$params = Mage::registry(Mage_Authorizenet_Directpost_PaymentController::REGISTRY_FORM_PARAMS_KEY);
$params = Mage::registry('authorizenet_directpost_form_params');
if (is_null($params)) {
$params = array();
}
Expand Down

0 comments on commit b8f3ea4

Please sign in to comment.