Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Jun 12, 2023
2 parents e3d1626 + dc52061 commit 7145d4f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 37 deletions.
14 changes: 6 additions & 8 deletions app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ protected function _beforeToHtml()
'url' => $this->getUrl('*/*/wishlist', ['_current' => true]),
]);

if (Mage::helper('core')->isModuleOutputEnabled('Mage_Newsletter')) {
if (Mage::helper('core')->isModuleOutputEnabled('Mage_Newsletter') && Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) {
/** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter $block */
$block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter');
if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) {
$this->addTab('newsletter', [
'label' => Mage::helper('customer')->__('Newsletter'),
'content' => $block->initForm()->toHtml()
]);
}
$this->addTab('newsletter', [
'label' => Mage::helper('customer')->__('Newsletter'),
'content' => $block->initForm()->toHtml()
]);
}

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

if (Mage::getSingleton('admin/session')->isAllowed('catalog/tag')) {
if (Mage::helper('core')->isModuleEnabled('Mage_Tag') && Mage::getSingleton('admin/session')->isAllowed('catalog/tag')) {
$this->addTab('tags', [
'label' => Mage::helper('customer')->__('Product Tags'),
'class' => 'ajax',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
$html .= '</td>';

if ($addInheritCheckbox) {
$defText = $element->getDefaultValue();
$defText = (string)$element->getDefaultValue();
if ($options) {
$defTextArr = [];
foreach ($options as $k => $v) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ protected function _getNeedMemoryForFile($file = null)

$imageInfo = getimagesize($file);

if (!isset($imageInfo[0]) || !isset($imageInfo[1])) {
if ($imageInfo === false) {
return 0;
}
if (!isset($imageInfo['channels'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<script type="text/javascript">
Ext.EventManager.onDocumentReady(function() {
var categoryLoader = new Ext.tree.TreeLoader({
dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
});

categoryLoader.createNode = function(config) {
Expand Down Expand Up @@ -71,7 +71,7 @@ Ext.EventManager.onDocumentReady(function() {

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

function bildCategoryTree(parent, config){
if (!config) return null;

if (parent && config && config.length){
for (var i = 0; i < config.length; i++){
function bildCategoryTree(parent, config) {
if (!config) {
return null;
}
if (parent && config && config.length) {
for (var i = 0; i < config.length; i++) {
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
var node;
var _node = Object.clone(config[i]);
Expand All @@ -106,14 +107,14 @@ function bildCategoryTree(parent, config){
}
parent.appendChild(node);
node.loader = node.getOwnerTree().loader;
if(config[i].children){
if (config[i].children) {
bildCategoryTree(node, config[i].children);
}
}
}
}

function categoryClick(node, e){
function categoryClick(node, e) {
if (node.disabled) {
return;
}
Expand Down
34 changes: 17 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/extjs/ext-tree-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Ext.extend(Ext.tree.CheckboxNodeUI, Ext.tree.TreeNodeUI, {
render : function(bulkRender){
var n = this.node;
var targetNode = n.parentNode ?
n.parentNode.ui.getContainer() : n.ownerTree.container.dom; /* in later svn builds this changes to n.ownerTree.innerCt.dom */
n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; /* in previous svn builds this was n.ownerTree.container.dom */
if(!this.rendered){
this.rendered = true;
var a = n.attributes;
Expand Down

0 comments on commit 7145d4f

Please sign in to comment.