Skip to content

Commit 7145d4f

Browse files
committed
Merge branch 'main' into next
2 parents e3d1626 + dc52061 commit 7145d4f

File tree

6 files changed

+36
-37
lines changed

6 files changed

+36
-37
lines changed

app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,13 @@ protected function _beforeToHtml()
7373
'url' => $this->getUrl('*/*/wishlist', ['_current' => true]),
7474
]);
7575

76-
if (Mage::helper('core')->isModuleOutputEnabled('Mage_Newsletter')) {
76+
if (Mage::helper('core')->isModuleOutputEnabled('Mage_Newsletter') && Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) {
7777
/** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter $block */
7878
$block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter');
79-
if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) {
80-
$this->addTab('newsletter', [
81-
'label' => Mage::helper('customer')->__('Newsletter'),
82-
'content' => $block->initForm()->toHtml()
83-
]);
84-
}
79+
$this->addTab('newsletter', [
80+
'label' => Mage::helper('customer')->__('Newsletter'),
81+
'content' => $block->initForm()->toHtml()
82+
]);
8583
}
8684

8785
if (Mage::getSingleton('admin/session')->isAllowed('catalog/reviews_ratings')) {
@@ -92,7 +90,7 @@ protected function _beforeToHtml()
9290
]);
9391
}
9492

95-
if (Mage::getSingleton('admin/session')->isAllowed('catalog/tag')) {
93+
if (Mage::helper('core')->isModuleEnabled('Mage_Tag') && Mage::getSingleton('admin/session')->isAllowed('catalog/tag')) {
9694
$this->addTab('tags', [
9795
'label' => Mage::helper('customer')->__('Product Tags'),
9896
'class' => 'ajax',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
7878
$html .= '</td>';
7979

8080
if ($addInheritCheckbox) {
81-
$defText = $element->getDefaultValue();
81+
$defText = (string)$element->getDefaultValue();
8282
if ($options) {
8383
$defTextArr = [];
8484
foreach ($options as $k => $v) {

app/code/core/Mage/Catalog/Model/Product/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ protected function _getNeedMemoryForFile($file = null)
295295

296296
$imageInfo = getimagesize($file);
297297

298-
if (!isset($imageInfo[0]) || !isset($imageInfo[1])) {
298+
if ($imageInfo === false) {
299299
return 0;
300300
}
301301
if (!isset($imageInfo['channels'])) {

app/design/adminhtml/default/default/template/catalog/product/edit/categories.phtml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<script type="text/javascript">
2727
Ext.EventManager.onDocumentReady(function() {
2828
var categoryLoader = new Ext.tree.TreeLoader({
29-
dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
29+
dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
3030
});
3131

3232
categoryLoader.createNode = function(config) {
@@ -71,7 +71,7 @@ Ext.EventManager.onDocumentReady(function() {
7171

7272
// set the root node
7373
var root = new Ext.tree.TreeNode({
74-
text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->getName()) ?>',
74+
text: '<?php echo $this->jsQuoteEscape($this->buildNodeName($this->getRootNode())) ?>',
7575
draggable:false,
7676
checked:'<?php echo $this->getRootNode()->getChecked() ?>',
7777
id:'<?php echo $this->getRootNode()->getId() ?>',
@@ -89,11 +89,12 @@ Ext.EventManager.onDocumentReady(function() {
8989
//tree.expandAll();
9090
});
9191

92-
function bildCategoryTree(parent, config){
93-
if (!config) return null;
94-
95-
if (parent && config && config.length){
96-
for (var i = 0; i < config.length; i++){
92+
function bildCategoryTree(parent, config) {
93+
if (!config) {
94+
return null;
95+
}
96+
if (parent && config && config.length) {
97+
for (var i = 0; i < config.length; i++) {
9798
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
9899
var node;
99100
var _node = Object.clone(config[i]);
@@ -106,14 +107,14 @@ function bildCategoryTree(parent, config){
106107
}
107108
parent.appendChild(node);
108109
node.loader = node.getOwnerTree().loader;
109-
if(config[i].children){
110+
if (config[i].children) {
110111
bildCategoryTree(node, config[i].children);
111112
}
112113
}
113114
}
114115
}
115116

116-
function categoryClick(node, e){
117+
function categoryClick(node, e) {
117118
if (node.disabled) {
118119
return;
119120
}

composer.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/extjs/ext-tree-checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Ext.extend(Ext.tree.CheckboxNodeUI, Ext.tree.TreeNodeUI, {
6565
render : function(bulkRender){
6666
var n = this.node;
6767
var targetNode = n.parentNode ?
68-
n.parentNode.ui.getContainer() : n.ownerTree.container.dom; /* in later svn builds this changes to n.ownerTree.innerCt.dom */
68+
n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; /* in previous svn builds this was n.ownerTree.container.dom */
6969
if(!this.rendered){
7070
this.rendered = true;
7171
var a = n.attributes;

0 commit comments

Comments
 (0)