Skip to content

Commit b8f3ea4

Browse files
committed
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
1 parent f8dac8f commit b8f3ea4

File tree

217 files changed

+9603
-3377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+9603
-3377
lines changed

CHANGELOG.markdown

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
Update as of 5/23/2012
2+
======================
3+
* Published performance tests (`dev/tests/performance`)
4+
* Implemented support of ImageMagick library for processing images
5+
* Distinguished "Page Fragments" and "Pages" in layout handles declaration
6+
* Reduced performance drop caused by introducing containers
7+
* Implemented Magento_Data_Structure library which is used to handle structure of layout elements
8+
* Fixed some issues:
9+
* Fixed error on saving newsletter template
10+
* Fixed some checkout issues:
11+
* order is not placed if 3D Secure is used
12+
* transaction is not created if PayPal Standard is used
13+
* "Purchase Order Number" field is not displayed
14+
* failed checkout on concurrent user requests
15+
* Fixed incorrect shipment creation: shipping and tracking information was not saved
16+
* Fixed broken category page when "Use Flat Catalog Product" is enabled
17+
* Fixed incorrect applying of discount to a sub-product, if more two rules are being applied
18+
* Fixed broken "Edit" product link in Wishlist and Shopping Cart
19+
* Fixed broken installation when "pub/media" is not writable
20+
* Fixed resetting Design Theme configuration option when User-Agent Exception is added
21+
* Fixed error while running unit tests, when Zend Framework is installed with PEAR
22+
* Fixed incorrect processing of "before" and "after" layout instructions in case, when the instruction refers to a node, which is not processed yet
23+
* Fixed broken import/export functionality
24+
* Fixed broken Web Services pages in Admin Panel
25+
* Fixed broken creation of URL rewrite
26+
* Fixed error in Weee module caused broken view pages of configurable products with recurring profile or downloadable/bundle product
27+
* Fixed error on submitting XML Connect application
28+
* Fixed broken design when database is used as media storage
29+
* Other small changes
30+
131
Update as of 5/09/2012
232
======================
333
* Implemented configuration option that enables the page types hierarchy usage during the page generation

app/Mage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public static function dispatchEvent($name, array $data = array())
415415
{
416416
Magento_Profiler::start('EVENT:' . $name);
417417
$result = self::app()->dispatchEvent($name, $data);
418-
Magento_Profiler::stop('DISPATCH EVENT:'.$name);
418+
Magento_Profiler::stop('EVENT:'.$name);
419419
return $result;
420420
}
421421

@@ -688,8 +688,8 @@ public static function run($code = '', $type = 'store', $options = array())
688688
*/
689689
protected static function _setIsInstalled($options = array())
690690
{
691-
if (isset($options['is_installed']) && $options['is_installed']) {
692-
self::$_isInstalled = true;
691+
if (isset($options['is_installed'])) {
692+
self::$_isInstalled = (bool) $options['is_installed'];
693693
}
694694
}
695695

app/code/community/Phoenix/Moneybookers/view/frontend/layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
2828
-->
2929
<layout version="0.1.0">
30-
<moneybookers_processing_payment translate="label" type="page" parent="checkout_onepage_paymentmethod">
30+
<moneybookers_processing_payment translate="label" type="page" parent="default">
3131
<label>Moneybookers Payment</label>
3232
<reference name="root">
3333
<action method="setTemplate"><template>1column.phtml</template></action>

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ protected function _prepareLayout()
5757
->setSortOrder()
5858
->load();
5959

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

7477
$this->addTab('group_'.$group->getId(), array(
7578
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__($group->getAttributeGroupName()),
76-
'content' => $this->_translateHtml($this->getLayout()->createBlock($this->getAttributeTabBlock(),
77-
'adminhtml.catalog.product.edit.tab.attributes')->setGroup($group)
78-
->setGroupAttributes($attributes)
79-
->toHtml()),
79+
'content' => $this->_translateHtml($tabAttributesBlock->setGroup($group)
80+
->setGroupAttributes($attributes)
81+
->toHtml()
82+
),
8083
));
8184
}
8285

app/code/core/Mage/Adminhtml/Block/System/Config/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP
292292

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

295-
if (isset($this->_configData[$path])) {
295+
if (array_key_exists($path, $this->_configData)) {
296296
$data = $this->_configData[$path];
297297
$inherit = false;
298298
} else {

app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public function getArrayRows()
148148
$rowColumnValues = array();
149149
foreach ($row as $key => $value) {
150150
$row[$key] = $this->escapeHtml($value);
151+
$rowColumnValues[$this->_getCellInputElementId($rowId, $key)] = $row[$key];
151152
}
152153
$row['_id'] = $rowId;
153154
$row['column_values'] = $rowColumnValues;

app/code/core/Mage/Adminhtml/Block/Urlrewrite.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
/**
2828
* Block for Urlrewrites grid container
2929
*
30-
* @category Mage
31-
* @package Mage_Adminhtml
30+
* @method Mage_Adminhtml_Block_Urlrewrite setSelectorBlock(Mage_Adminhtml_Block_Urlrewrite_Selector $value)
31+
* @method null|Mage_Adminhtml_Block_Urlrewrite_Selector getSelectorBlock()
32+
*
33+
* @category Mage
34+
* @package Mage_Adminhtml
3235
* @author Magento Core Team <core@magentocommerce.com>
3336
*/
3437
class Mage_Adminhtml_Block_Urlrewrite extends Mage_Adminhtml_Block_Widget_Grid_Container
@@ -59,12 +62,18 @@ public function __construct()
5962
*/
6063
public function getCreateUrl()
6164
{
62-
if (Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector')) {
63-
$modes = array_keys(Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector')->getModes());
64-
$url = $this->getUrl('*/*/edit') . array_shift($modes);
65-
} else {
66-
$url = $this->getUrl('*/*/edit');
65+
$url = $this->getUrl('*/*/edit');
66+
67+
$selectorBlock = $this->getSelectorBlock();
68+
if ($selectorBlock === null) {
69+
$selectorBlock = Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Selector');
6770
}
71+
72+
if ($selectorBlock) {
73+
$modes = array_keys($selectorBlock->getModes());
74+
$url .= reset($modes);
75+
}
76+
6877
return $url;
6978
}
7079
}

app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function _setFormChild()
156156
{
157157
$helper = Mage::helper('Mage_Adminhtml_Helper_Data');
158158

159-
$this->setChild('form', Mage::getBlockSingleton('Mage_Adminhtml_Block_Urlrewrite_Edit_Form'));
159+
$this->setChild('form', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Urlrewrite_Edit_Form'));
160160
if ($this->getUrlrewriteId()) {
161161
$this->_addButton('reset', array(
162162
'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset'),

app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ public function __construct()
7878

7979
protected function _prepareLayout()
8080
{
81-
if ($this->_blockGroup && $this->_controller && $this->_mode) {
81+
if ($this->_blockGroup && $this->_controller && $this->_mode
82+
&& !$this->_layout->getChildName($this->_nameInLayout, 'form')
83+
) {
8284
$this->setChild(
8385
'form',
8486
$this->getLayout()->createBlock($this->_blockGroup
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
/**
3+
* Magento
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the Open Software License (OSL 3.0)
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/osl-3.0.php
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to license@magentocommerce.com so we can send you a copy immediately.
14+
*
15+
* DISCLAIMER
16+
*
17+
* Do not edit or add to this file if you wish to upgrade Magento to newer
18+
* versions in the future. If you wish to customize Magento for your
19+
* needs please refer to http://www.magentocommerce.com for more information.
20+
*
21+
* @category Mage
22+
* @package Mage_Adminhtml
23+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25+
*/
26+
27+
28+
/**
29+
* System config image field backend model for Zend PDF generator
30+
*
31+
* @category Mage
32+
* @package Mage_Adminhtml
33+
* @author Magento Core Team <core@magentocommerce.com>
34+
*/
35+
class Mage_Adminhtml_Model_System_Config_Backend_Image_Adapter extends Mage_Core_Model_Config_Data
36+
{
37+
/**
38+
* Checks if choosen image adapter available
39+
*
40+
* @throws Mage_Core_Exception if some of adapter dipendencies was not loaded
41+
* @return Mage_Adminhtml_Model_System_Config_Backend_File
42+
*/
43+
protected function _beforeSave()
44+
{
45+
$value = $this->getValue();
46+
47+
$adapter = Varien_Image_Adapter::factory($value);
48+
try {
49+
$adapter->checkDependencies();
50+
} catch (Exception $e) {
51+
$message = Mage::helper('Mage_Core_Helper_Data')->__('Unable to use choosen image adapter because of some dependies are missed');
52+
throw new Mage_Core_Exception($message);
53+
}
54+
55+
return $this;
56+
}
57+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* Magento
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the Open Software License (OSL 3.0)
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/osl-3.0.php
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to license@magentocommerce.com so we can send you a copy immediately.
14+
*
15+
* DISCLAIMER
16+
*
17+
* Do not edit or add to this file if you wish to upgrade Magento to newer
18+
* versions in the future. If you wish to customize Magento for your
19+
* needs please refer to http://www.magentocommerce.com for more information.
20+
*
21+
* @category Mage
22+
* @package Mage_Adminhtml
23+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25+
*/
26+
27+
28+
class Mage_Adminhtml_Model_System_Config_Source_Image_Adapter
29+
{
30+
/**
31+
* Return hash of image adapter codes and labels
32+
*
33+
* @return array
34+
*/
35+
public function toOptionArray()
36+
{
37+
return array(
38+
Varien_Image_Adapter::ADAPTER_IM => Mage::helper('Mage_Adminhtml_Helper_Data')->__('ImageMagick'),
39+
Varien_Image_Adapter::ADAPTER_GD2 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('PHP Gd 2'),
40+
);
41+
}
42+
}

app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ public function thumbnailAction()
186186
$file = Mage::helper('Mage_Cms_Helper_Wysiwyg_Images')->idDecode($file);
187187
$thumb = $this->getStorage()->resizeOnTheFly($file);
188188
if ($thumb !== false) {
189-
$image = Varien_Image_Adapter::factory('GD2');
189+
$adapter = Mage::helper('Mage_Core_Helper_Data')->getImageAdapterType();
190+
$image = Varien_Image_Adapter::factory($adapter);
190191
$image->open($thumb);
191192
$image->display();
192193
} else {

app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ public function directiveAction()
4343
$directive = $this->getRequest()->getParam('___directive');
4444
$directive = Mage::helper('Mage_Core_Helper_Data')->urlDecode($directive);
4545
$url = Mage::getModel('Mage_Core_Model_Email_Template_Filter')->filter($directive);
46+
$adapter = Mage::helper('Mage_Core_Helper_Data')->getImageAdapterType();
4647
try {
47-
$image = Varien_Image_Adapter::factory('GD2');
48+
$image = Varien_Image_Adapter::factory($adapter);
4849
$image->open($url);
4950
$image->display();
5051
} catch (Exception $e) {
51-
$image = Varien_Image_Adapter::factory('GD2');
52+
$image = Varien_Image_Adapter::factory($adapter);
5253
$image->open(Mage::getSingleton('Mage_Cms_Model_Wysiwyg_Config')->getSkinImagePlaceholderUrl());
5354
$image->display();
5455
/*

app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Layout handle for grouped products
230230
</adminhtml_catalog_product_supergroup>
231231

232232
<adminhtml_catalog_product_supergroupgridonly>
233-
<container name="root" label="Root">
233+
<container name="root" label="Root" output="1">
234234
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group" name="catalog.product.edit.tab.super.group" />
235235
</container>
236236
</adminhtml_catalog_product_supergroupgridonly>
@@ -241,7 +241,7 @@ Layout handle for configurable products
241241
<adminhtml_catalog_product_configurable_new>
242242
<remove name="product_tabs"/>
243243
<reference name="left">
244-
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable" name="configurable_product_tabs"></block>
244+
<block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable" name="configurable_product_tabs"/>
245245
</reference>
246246
</adminhtml_catalog_product_configurable_new>
247247

app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
<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>
3030
<div class="create-order-sidebar-container">
3131
<?php echo $this->getChildHtml('top_button'); ?>
32-
<?php foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $_child): ?>
33-
<?php $_alias = $_child->getBlockAlias(); ?>
32+
<?php foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $_alias => $_child): ?>
3433
<?php if ($_alias != 'top_button' && $_alias != 'bottom_button'): ?>
3534
<div id="order-sidebar_<?php echo $_alias ?>">
3635
<?php if($this->canDisplay($_child)): ?>

app/code/core/Mage/Api2/Block/Adminhtml/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct()
4040
{
4141
parent::__construct();
4242

43-
$this->_blockGroup = 'api2';
43+
$this->_blockGroup = 'Mage_Api2';
4444
$this->_controller = 'adminhtml_attribute';
4545
$this->_headerText = $this->__('REST Attributes');
4646
$this->_removeButton('add');

app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Mage_Api2_Block_Adminhtml_Attribute_Edit extends Mage_Adminhtml_Block_Widg
3939
public function __construct()
4040
{
4141
$this->_objectId = 'id';
42-
$this->_blockGroup = 'api2';
42+
$this->_blockGroup = 'Mage_Api2';
4343
$this->_controller = 'adminhtml_attribute';
4444

4545
parent::__construct();

app/code/core/Mage/Api2/Block/Adminhtml/Roles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct()
4040
{
4141
parent::__construct();
4242

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

app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Mage_Api2_Block_Adminhtml_Roles_Buttons extends Mage_Adminhtml_Block_Templ
4141
public function __construct()
4242
{
4343
parent::__construct();
44-
$this->setTemplate('api2/role/buttons.phtml');
44+
$this->setTemplate('role/buttons.phtml');
4545
}
4646

4747
/**

app/code/core/Mage/Api2/Model/Acl/Global/Role.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Mage_Api2_Model_Acl_Global_Role extends Mage_Core_Model_Abstract
7272
*/
7373
protected function _construct()
7474
{
75-
$this->_init('Mage_Api2_Model_Acl_Global_Role');
75+
$this->_init('Mage_Api2_Model_Resource_Acl_Global_Role');
7676
}
7777

7878
/**

app/code/core/Mage/Api2/Model/Acl/Global/Rule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ class Mage_Api2_Model_Acl_Global_Rule extends Mage_Core_Model_Abstract
6060
*/
6161
protected function _construct()
6262
{
63-
$this->_init('Mage_Api2_Model_Acl_Global_Rule');
63+
$this->_init('Mage_Api2_Model_Resource_Acl_Global_Rule');
6464
}
6565
}

app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Mage_Authorizenet_Block_Directpost_Iframe extends Mage_Core_Block_Template
4242
*/
4343
protected function _prepareLayout()
4444
{
45-
$params = Mage::registry(Mage_Authorizenet_Directpost_PaymentController::REGISTRY_FORM_PARAMS_KEY);
45+
$params = Mage::registry('authorizenet_directpost_form_params');
4646
if (is_null($params)) {
4747
$params = array();
4848
}

0 commit comments

Comments
 (0)