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 Apr 13, 2023
2 parents eaa1b47 + 81702bc commit 88a4156
Show file tree
Hide file tree
Showing 1,124 changed files with 2,371 additions and 2,275 deletions.
41 changes: 33 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ level of backwards compatibility to the official releases.

## Table of contents

- [Releases and Versioning](#releases-and-versioning)
- [Currently Maintained Versions](#currently-maintained-versions)
- [Requirements](#requirements)
- [Installation](#installation)
- [Manual Install](#manual-install)
Expand All @@ -28,22 +30,42 @@ level of backwards compatibility to the official releases.
- [Secure your installation](#secure-your-installation)
- [Apache .htaccess](#apache-htaccess)
- [Nginx](#nginx)
- [Magento 1 Compatibility](#magento-1-compatibility)
- [Changes](#changes)
- [Between Magento 1.9.4.5 and OpenMage 19.x](#between-magento-1945-and-openmage-19x)
- [Between OpenMage 19.4.18 / 20.0.16 and 19.4.19 / 20.0.17](#between-openmage-19418--20016-and-19419--20017)
- [Since OpenMage 19.5.0 / 20.1.0](#since-openmage-1950--2010)
- [New Config Options](#new-config-options)
- [New Events](#new-events)
- [Changes to SOAP/WSDL](#changes-to-soapwsdl)
- [Development Environment with ddev](#development-environment-with-ddev)
- [Development with PHP 8.1+](#development-with-php-81)
- [PhpStorm Factory Helper](#phpstorm-factory-helper)
- [Versioning](#versioning)
- [Public Communication](#public-communication)
- [Maintainers](#maintainers)
- [License](#license)
- [Contributors](#contributors-)

## Releases and Versioning

This project more strictly adheres to [Semantic Versioning](http://semver.org/) compared to the original Magento version numbering system where the "1"
was essentially a fixed number. See the [Terminology](https://github.com/OpenMage/rfcs/blob/main/accepted/0002-release-schedule.md#terminology)
section of [RFC 0002 - Release Schedule](https://github.com/OpenMage/rfcs/blob/main/accepted/0002-release-schedule.md) for more information on how the terms MAJOR, MINOR and PATCH are defined and applied.

The OpenMage team and community maintains OpenMage LTS versions as follows:

- The latest MAJOR.MINOR version always receives PATCH updates.
- The latest MAJOR version always receives MINOR updates.
- The latest MAJOR.MINOR branch for each MAJOR version receives PATCH updates for at least 2 years from the time of inception of the initial MAJOR version release.

In a nutshell:

- If you want to stay on the cutting edge with the latest improvements use the latest MAJOR version.
- If you want maximum backwards compatibility and minimal upgrade hassle use the next-latest MAJOR version so that you can still receive important security/stability/regression fixes.

### Currently Maintained Versions

- 20.x is the latest MAJOR version and will receive PATCH updates until 2 years after the date that 21.x is released.
- 19.4.x will receive PATCH updates until April 4, 2025.

## Requirements

- PHP 7.4+ (PHP 8.0 is supported, PHP 8.1 supported but some warnings may be shown/logged, PHP 8.2 is usable but still being tested)
Expand Down Expand Up @@ -166,6 +188,14 @@ RewriteRule ^api/rest api.php?type=rest [QSA,L]
rewrite ^/api/(\w+).*$ /api.php?type=$1 last;`
```

## Magento 1 Compatibility

OpenMage LTS 19.4.0 is the first tagged version using the OpenMage LTS version naming system and all 19.x versions are mostly backward-compatible
with Magento 1.9.4.x.

OpenMage LTS 20.x and later have more changes that may not be 100% backward-compatible, but minimizing migration and upgrade hassle for users is always
considered an important goal and factors heavily into the changes that are accepted even when accepting changes for "MAJOR" releases, described in [Releases and Versioning](#releases-and-versioning) above.

## Changes

Most important changes will be listed here, all other changes since `19.4.0` can be found in
Expand Down Expand Up @@ -320,11 +350,6 @@ You can add additional meta files in this directory to cover your own project fi
[PhpStorm advanced metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html)
for more information.
## Versioning
Though Magento does __not__ follow [Semantic Versioning](http://semver.org/) we aim to provide a workable system for
dependency definition.
## Public Communication
* [Discord](https://discord.gg/EV8aNbU) (maintained by Flyingmana)
Expand Down
4 changes: 2 additions & 2 deletions api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* that is bundled with this package in the file LICENSE.txt.
* It is also available at https://opensource.org/license/osl-3-0-php
*
* @category Mage
* @package Mage
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Expand Down
4 changes: 2 additions & 2 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* that is bundled with this package in the file LICENSE.txt.
* It is also available at https://opensource.org/license/osl-3-0-php
*
* @category Mage
* @package Mage
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2017-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Expand Down
4 changes: 2 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* that is bundled with this package in the file LICENSE.txt.
* It is also available at https://opensource.org/license/osl-3-0-php
*
* @category Mage
* @package Mage
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ public function getDefaultConfigValue($field)
return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field, $this->getStoreId());
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('catalog')->__('Inventory');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public function getStoreCollection(Mage_Core_Model_Store_Group $group)
return $group->getStores();
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('catalog')->__('Websites');
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction;

/**
* @category Mage
* @category Mage
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
Expand Down
4 changes: 0 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ public function getCreditmemo()
return Mage::registry('current_creditmemo');
}

/**
* ######################### SALES ##################################
*/

/**
* Retrieve available order
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function __construct()
$this->setId('sales_order_create_coupons_form');
}

/**
* @return string
*/
public function getCouponCode()
{
return $this->getParentBlock()->getQuote()->getCouponCode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,19 @@ public function getGridUrl()
return $this->getUrl('*/*/creditmemos', ['_current' => true]);
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('sales')->__('Credit Memos');
}

public function getTabTitle()
{
return Mage::helper('sales')->__('Order Credit Memos');
return Mage::helper('sales')->__('Credit Memos');
}

public function canShowTab()
{
return true;
return Mage::getSingleton('admin/session')->isAllowed('sales/creditmemo');
}

public function isHidden()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function getTabLabel()
*/
public function getTabTitle()
{
return Mage::helper('sales')->__('Order History');
return Mage::helper('sales')->__('Comments History');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,14 @@ public function getViewUrl($orderId)
return $this->getUrl('*/*/*', ['order_id' => $orderId]);
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('sales')->__('Information');
}

public function getTabTitle()
{
return Mage::helper('sales')->__('Order Information');
return Mage::helper('sales')->__('Information');
}

public function canShowTab()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,19 @@ public function getGridUrl()
return $this->getUrl('*/*/invoices', ['_current' => true]);
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('sales')->__('Invoices');
}

public function getTabTitle()
{
return Mage::helper('sales')->__('Order Invoices');
return Mage::helper('sales')->__('Invoices');
}

public function canShowTab()
{
return true;
return Mage::getSingleton('admin/session')->isAllowed('sales/invoice');
}

public function isHidden()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,22 @@ public function getGridUrl()
return $this->getUrl('*/*/shipments', ['_current' => true]);
}

/**
* ######################## TAB settings #################################
*/
public function getTabLabel()
{
return Mage::helper('sales')->__('Shipments');
}

public function getTabTitle()
{
return Mage::helper('sales')->__('Order Shipments');
return Mage::helper('sales')->__('Shipments');
}

public function canShowTab()
{
if ($this->getOrder()->getIsVirtual()) {
return false;
}
return true;
return Mage::getSingleton('admin/session')->isAllowed('sales/shipment');
}

public function isHidden()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getTabTitle()
*/
public function canShowTab()
{
return true;
return Mage::getSingleton('admin/session')->isAllowed('sales/transactions');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,10 @@ public function getCondition()
}
$rate = $this->_getRate($displayCurrency, $this->getColumn()->getCurrencyCode());

if (isset($value['from'])) {
$from = $value['from'] * $rate;
$value['from'] = sprintf('%F', $from);
}

if (isset($value['to'])) {
$to = $value['to'] * $rate;
$value['to'] = sprintf('%F', $to);
foreach (['from', 'to'] as $key) {
if (isset($value[$key]) && is_numeric($value[$key])) {
$value[$key] = sprintf('%F', $value[$key] * $rate);
}
}

$this->prepareRates($displayCurrency);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function _construct()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('sales/order')
->_setActiveMenu('sales/creditmemo')
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
->_addBreadcrumb($this->__('Credit Memos'), $this->__('Credit Memos'));
return $this;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function _construct()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('sales/order')
->_setActiveMenu('sales/invoice')
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
->_addBreadcrumb($this->__('Invoices'), $this->__('Invoices'));
return $this;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function _construct()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('sales/order')
->_setActiveMenu('sales/shipment')
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
->_addBreadcrumb($this->__('Shipments'), $this->__('Shipments'));
return $this;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Model/Config/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function save()
}
}

$backendClass = $helper->getBackendModelByFieldConfig($fieldConfig);
$backendClass = $fieldConfig ? $helper->getBackendModelByFieldConfig($fieldConfig) : false;
if (!$backendClass) {
$backendClass = 'core/config_data';
}
Expand Down
2 changes: 0 additions & 2 deletions app/code/core/Mage/Adminhtml/Model/Search/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ public function load()
['attribute' => 'billing_firstname', 'like' => $query . '%'],
['attribute' => 'billing_lastname', 'like' => $query . '%'],
['attribute' => 'billing_telephone', 'like' => $query . '%'],
['attribute' => 'billing_postcode', 'like' => $query . '%'],

['attribute' => 'shipping_firstname', 'like' => $query . '%'],
['attribute' => 'shipping_lastname', 'like' => $query . '%'],
['attribute' => 'shipping_telephone', 'like' => $query . '%'],
['attribute' => 'shipping_postcode', 'like' => $query . '%'],
])
->setCurPage($this->getStart())
->setPageSize($this->getLimit())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function _initAction()
$this->loadLayout('popup');
} else {
$this->loadLayout()
->_setActiveMenu('catalog/attributes')
->_setActiveMenu('catalog/attributes/attributes')
->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'))
->_addBreadcrumb(
Mage::helper('catalog')->__('Manage Product Attributes'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function indexAction()
$this->_setTypeId();

$this->loadLayout();
$this->_setActiveMenu('catalog/sets');
$this->_setActiveMenu('catalog/attributes/sets');

$this->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'));
$this->_addBreadcrumb(
Expand Down Expand Up @@ -71,7 +71,7 @@ public function editAction()
Mage::register('current_attribute_set', $attributeSet);

$this->loadLayout();
$this->_setActiveMenu('catalog/sets');
$this->_setActiveMenu('catalog/attributes/sets');
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);

$this->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function viewAction()
$block = $this->getLayout()->getBlock('sales_creditmemo_view');
$block->updateBackButtonUrl($this->getRequest()->getParam('come_from'));

$this->_setActiveMenu('sales/order')
$this->_setActiveMenu('sales/creditmemo')
->renderLayout();
} else {
$this->_redirect('*/*');
Expand Down Expand Up @@ -223,7 +223,7 @@ public function newAction()
}

$this->loadLayout()
->_setActiveMenu('sales/order')
->_setActiveMenu('sales/creditmemo')
->renderLayout();
} else {
$this->_forward('noRoute');
Expand Down
Loading

0 comments on commit 88a4156

Please sign in to comment.