Skip to content

Commit

Permalink
Merge branch 'main' into rector-2-cq
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 22, 2024
2 parents 5696be4 + 75cd467 commit 6110b0d
Show file tree
Hide file tree
Showing 36 changed files with 76 additions and 57 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.github export-ignore
/dev export-ignore
/docs export-ignore
/tests export-ignore

/.all-contributorsrc export-ignore
/.gitattributes export-ignore
Expand All @@ -16,6 +17,7 @@
/.phpmd.dist.xml export-ignore
/.phpstan.dist.baseline.neon export-ignore
/.phpstan.dist.neon export-ignore
/rector.php export-ignore

/README.md export-ignore

Expand Down
15 changes: 6 additions & 9 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -895,12 +895,9 @@
'phpunit':
- changed-files:
- any-glob-to-any-file: [
dev/test/*,
dev/phpunit*,
dev/sonar*,
phpunit*,
.github/workflows/phpunit.yml,
.github/workflows/sonar.yml
tests/*,
.github/workflows/phpunit.yml
]

'ddev':
Expand All @@ -912,7 +909,7 @@

'rector':
- changed-files:
- any-glob-to-any-file: [
rector.php,
.github/workflows/rector.yml
]
- any-glob-to-any-file: [
rector.php,
.github/workflows/rector.yml
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function render(Varien_Object $row)
$href = $row->getPreviewUrl();
} else {
$urlModel = Mage::getModel('core/url')->setStore($row->getData('_first_store_id'));
$href = $urlModel->getUrl(
$href = $urlModel->getDirectUrl(
$row->getIdentifier(),
[
'_current' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout();
$this->_setActiveMenu('system/services/roles');
$this->_setActiveMenu('system/api/roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/services/users')
->_setActiveMenu('system/api/users')
->_addBreadcrumb($this->__('Web Services'), $this->__('Web Services'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Users'), $this->__('Users'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function editAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('customer/new');
$this->_setActiveMenu('customer/manage');

$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Notifications'));

$this->loadLayout()
->_setActiveMenu('system/notification')
->_setActiveMenu('system/adminnotification')
->_addBreadcrumb(Mage::helper('adminnotification')->__('Messages Inbox'), Mage::helper('adminhtml')->__('Messages Inbox'))
->_addContent($this->getLayout()->createBlock('adminhtml/notification_inbox'))
->renderLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Mage_Adminhtml_Permissions_BlockController extends Mage_Adminhtml_Controll
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/blocks')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Blocks'), $this->__('Blocks'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Mage_Adminhtml_Permissions_OrphanedResourceController extends Mage_Adminht
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/orphaned_resources')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Orphaned Resources'), $this->__('Orphaned Role Resources'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout();
$this->_setActiveMenu('system/acl');
$this->_setActiveMenu('system/acl/roles');
$this->_addBreadcrumb($this->__('System'), $this->__('System'));
$this->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/users')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Users'), $this->__('Users'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Mage_Adminhtml_Permissions_VariableController extends Mage_Adminhtml_Contr
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/variables')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Variables'), $this->__('Variables'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function accountsAction()
->_title($this->__('New Accounts'));

$this->_initAction()
->_setActiveMenu('report/customer/accounts')
->_setActiveMenu('report/customers/accounts')
->_addBreadcrumb(Mage::helper('adminhtml')->__('New Accounts'), Mage::helper('adminhtml')->__('New Accounts'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_customer_accounts'))
->renderLayout();
Expand Down Expand Up @@ -79,7 +79,7 @@ public function ordersAction()
->_title($this->__('Customers by Number of Orders'));

$this->_initAction()
->_setActiveMenu('report/customer/orders')
->_setActiveMenu('report/customers/orders')
->_addBreadcrumb(
Mage::helper('reports')->__('Customers by Number of Orders'),
Mage::helper('reports')->__('Customers by Number of Orders')
Expand Down Expand Up @@ -119,7 +119,7 @@ public function totalsAction()
->_title($this->__('Customers by Orders Total'));

$this->_initAction()
->_setActiveMenu('report/customer/totals')
->_setActiveMenu('report/customers/totals')
->_addBreadcrumb(
Mage::helper('reports')->__('Customers by Orders Total'),
Mage::helper('reports')->__('Customers by Orders Total')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function soldAction()
->_title($this->__('Products Ordered'));

$this->_initAction()
->_setActiveMenu('report/product/sold')
->_setActiveMenu('report/products/sold')
->_addBreadcrumb(Mage::helper('reports')->__('Products Ordered'), Mage::helper('reports')->__('Products Ordered'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_sold'))
->renderLayout();
Expand Down Expand Up @@ -161,7 +161,7 @@ public function lowstockAction()
->_title($this->__('Low Stock'));

$this->_initAction()
->_setActiveMenu('report/product/lowstock')
->_setActiveMenu('report/products/lowstock')
->_addBreadcrumb(Mage::helper('reports')->__('Low Stock'), Mage::helper('reports')->__('Low Stock'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_lowstock'))
->renderLayout();
Expand Down Expand Up @@ -203,7 +203,7 @@ public function downloadsAction()
->_title($this->__('Downloads'));

$this->_initAction()
->_setActiveMenu('report/product/downloads')
->_setActiveMenu('report/products/downloads')
->_addBreadcrumb(Mage::helper('reports')->__('Downloads'), Mage::helper('reports')->__('Downloads'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_downloads'))
->renderLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function salesAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE, 'sales');

$this->_initAction()
->_setActiveMenu('report/sales/sales')
->_setActiveMenu('report/salesroot/sales')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Sales Report'), Mage::helper('adminhtml')->__('Sales Report'));

$gridBlock = $this->getLayout()->getBlock('report_sales_sales.grid');
Expand Down Expand Up @@ -159,7 +159,7 @@ public function taxAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE, 'tax');

$this->_initAction()
->_setActiveMenu('report/sales/tax')
->_setActiveMenu('report/salesroot/tax')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Tax'), Mage::helper('adminhtml')->__('Tax'));

$gridBlock = $this->getLayout()->getBlock('report_sales_tax.grid');
Expand Down Expand Up @@ -202,7 +202,7 @@ public function shippingAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping');

$this->_initAction()
->_setActiveMenu('report/sales/shipping')
->_setActiveMenu('report/salesroot/shipping')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Shipping'), Mage::helper('adminhtml')->__('Shipping'));

$gridBlock = $this->getLayout()->getBlock('report_sales_shipping.grid');
Expand Down Expand Up @@ -245,7 +245,7 @@ public function invoicedAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced');

$this->_initAction()
->_setActiveMenu('report/sales/invoiced')
->_setActiveMenu('report/salesroot/invoiced')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Total Invoiced'), Mage::helper('adminhtml')->__('Total Invoiced'));

$gridBlock = $this->getLayout()->getBlock('report_sales_invoiced.grid');
Expand Down Expand Up @@ -288,7 +288,7 @@ public function refundedAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded');

$this->_initAction()
->_setActiveMenu('report/sales/refunded')
->_setActiveMenu('report/salesroot/refunded')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Total Refunded'), Mage::helper('adminhtml')->__('Total Refunded'));

$gridBlock = $this->getLayout()->getBlock('report_sales_refunded.grid');
Expand Down Expand Up @@ -331,7 +331,7 @@ public function couponsAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_COUPONS_FLAG_CODE, 'coupons');

$this->_initAction()
->_setActiveMenu('report/sales/coupons')
->_setActiveMenu('report/salesroot/coupons')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Coupons'), Mage::helper('adminhtml')->__('Coupons'));

$gridBlock = $this->getLayout()->getBlock('report_sales_coupons.grid');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function _initStatus()
public function indexAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Order Statuses'));
$this->loadLayout()->_setActiveMenu('system')->renderLayout();
$this->loadLayout()->_setActiveMenu('system/order_statuses')->renderLayout();
}

/**
Expand All @@ -73,6 +73,7 @@ public function newAction()
}
$this->_title($this->__('Sales'))->_title($this->__('Create New Order Status'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
}

Expand All @@ -86,6 +87,7 @@ public function editAction()
Mage::register('current_status', $status);
$this->_title($this->__('Sales'))->_title($this->__('Edit Order Status'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
} else {
$this->_getSession()->addError(
Expand Down Expand Up @@ -161,6 +163,7 @@ public function assignAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Assign Order Status to State'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('My Account'));

$this->loadLayout();
$this->_setActiveMenu('system/account');
$this->_setActiveMenu('system/myaccount');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_account_edit'));
$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function indexAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/gui');

/**
* Append profiles block to content
Expand Down Expand Up @@ -89,7 +89,7 @@ public function editAction()

$this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile'));

$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/gui');

$this->_addContent(
$this->getLayout()->createBlock('adminhtml/system_convert_gui_edit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function indexAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/profiles');

/**
* Append profiles block to content
Expand Down Expand Up @@ -121,7 +121,7 @@ public function editAction()

$this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile'));

$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/profiles');

$this->_addContent(
$this->getLayout()->createBlock('adminhtml/system_convert_profile_edit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Manage Currency Rates'));

$this->loadLayout();
$this->_setActiveMenu('system/currency');
$this->_setActiveMenu('system/currency/rates');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_currency'));
$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Design'));

$this->loadLayout();
$this->_setActiveMenu('system');
$this->_setActiveMenu('system/design');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_design'));
$this->renderLayout();
}
Expand All @@ -61,7 +61,7 @@ public function editAction()
$this->_title($this->__('System'))->_title($this->__('Design'));

$this->loadLayout();
$this->_setActiveMenu('system');
$this->_setActiveMenu('system/design');
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);

$id = (int) $this->getRequest()->getParam('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function indexAction()
->_title($this->__('Web Services'))
->_title($this->__('REST Attributes'));

$this->loadLayout()->_setActiveMenu('system/services/attributes');
$this->loadLayout()->_setActiveMenu('system/api/rest_attributes');

$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'))
->_addBreadcrumb($this->__('REST Attributes'), $this->__('REST Attributes'))
Expand All @@ -62,7 +62,7 @@ public function indexAction()
public function editAction()
{
$this->loadLayout()
->_setActiveMenu('system/services/attributes');
->_setActiveMenu('system/api/rest_attributes');

$type = $this->getRequest()->getParam('type');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function indexAction()
->_title($this->__('Web Services'))
->_title($this->__('REST Roles'));

$this->loadLayout()->_setActiveMenu('system/services/roles');
$this->loadLayout()->_setActiveMenu('system/api/rest_roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('REST Roles'), $this->__('REST Roles'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down Expand Up @@ -82,7 +82,7 @@ public function newAction()
->_title($this->__('Web Services'))
->_title($this->__('Rest Roles'));

$this->loadLayout()->_setActiveMenu('system/services/roles');
$this->loadLayout()->_setActiveMenu('system/api/rest_roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('REST Roles'), $this->__('REST Roles'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ public function getStockItem()
*/
public function hasStockItem()
{
return !!$this->_stockItem;
return (bool) $this->_stockItem;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public function checkProductBuyState($product = null)
if ($option->getIsRequire()) {
$customOption = $this->getProduct($product)
->getCustomOption(self::OPTION_PREFIX . $option->getId());
if (!$customOption || $customOption->getValue() === null || strlen($customOption->getValue()) === 0) {
if (!$customOption || $customOption->getValue() === null || (string) $customOption->getValue() === '') {
$this->getProduct($product)->setSkipCheckRequiredOption(true);
Mage::throwException(
Mage::helper('catalog')->__('The product has required options')
Expand Down
Loading

0 comments on commit 6110b0d

Please sign in to comment.