Skip to content

Commit 4b9d0fd

Browse files
authored
Merge branch 'OpenMage:main' into cypress-test
2 parents 7400270 + 9ff5c56 commit 4b9d0fd

File tree

17 files changed

+231
-11097
lines changed

17 files changed

+231
-11097
lines changed

.all-contributorsrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,34 @@
16611661
"contributions": [
16621662
"bug"
16631663
]
1664+
},
1665+
{
1666+
"login": "stasadev",
1667+
"name": "Stanislav Zhuk",
1668+
"avatar_url": "https://avatars.githubusercontent.com/u/24270994?v=4",
1669+
"profile": "https://github.com/stasadev",
1670+
"contributions": [
1671+
"code"
1672+
]
1673+
},
1674+
{
1675+
"login": "Axepih",
1676+
"name": "Axepih",
1677+
"avatar_url": "https://avatars.githubusercontent.com/u/95623175?v=4",
1678+
"profile": "https://github.com/Axepih",
1679+
"contributions": [
1680+
"review"
1681+
]
1682+
},
1683+
{
1684+
"login": "gdemarsico",
1685+
"name": "Gastón De Mársico",
1686+
"avatar_url": "https://avatars.githubusercontent.com/u/2066819?v=4",
1687+
"profile": "https://github.com/gdemarsico",
1688+
"contributions": [
1689+
"code",
1690+
"bug"
1691+
]
16641692
}
16651693
],
16661694
"commitType": "docs"

.github/CODE_OF_CONDUCT.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ Examples of unacceptable behavior by participants include:
3131
* Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

34+
### Attribution to Others
35+
36+
We expect all contributors to provide appropriate attribution to others in appreciation
37+
of work performed or ideas inspired by other members of the OpenMage community or other communities.
38+
39+
When creating a Pull Request or otherwise representing work or ideas to the community,
40+
if the work includes substantial code or inspiration leading directly to the authorship
41+
of specific lines of code taken from reading PRs, blog posts, release notes, etc. from
42+
another project (in particular Maho Commerce), website or other source, a mention must
43+
be made in the PR description or equivalent. The definition of "substantial" shall be
44+
as little as one line of code - if it's worth creating a commit and pull request for,
45+
it will be considered substantial.
46+
47+
For example:
48+
49+
> Credit for prior work inspiration to {ref}
50+
51+
Additionally, if the file that the code was copied from or heavily inspired by, in whole
52+
or in part, contains a copyright notice on a single line, that line must also be copied
53+
to the corresponding file in OpenMage, even if the filenames are slightly different.
54+
3455
## Our Responsibilities
3556

3657
Project maintainers are responsible for clarifying the standards of acceptable

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
# ChartJs library
2727
/js/lib/chartjs
2828

29+
# jQuery library
30+
/js/lib/jquery/jquery*
31+
2932
# TinyMCE library
3033
/js/lib/tinymce
3134

.phpstan.dist.baseline.neon

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,12 @@ parameters:
11401140
count: 1
11411141
path: app/code/core/Mage/Api2/Model/Resource.php
11421142

1143+
-
1144+
message: '#^Call to an undefined method Varien_Data_Collection_Db\:\:addAttributeToFilter\(\)\.$#'
1145+
identifier: method.notFound
1146+
count: 1
1147+
path: app/code/core/Mage/Api2/Model/Resource.php
1148+
11431149
-
11441150
message: '#^Method Mage_Api2_Model_Resource\:\:_create\(\) invoked with 1 parameter, 0 required\.$#'
11451151
identifier: arguments.count
@@ -6117,7 +6123,7 @@ parameters:
61176123
-
61186124
message: '#^If condition is always false\.$#'
61196125
identifier: if.alwaysFalse
6120-
count: 2
6126+
count: 3
61216127
path: app/code/core/Mage/Tax/Helper/Data.php
61226128

61236129
-

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
269269
<td align="center" valign="top" width="14.28%"><a href="https://alond.com.au/"><img src="https://avatars.githubusercontent.com/u/1549372?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>pauldpauld</b></sub></a></td>
270270
<td align="center" valign="top" width="14.28%"><a href="https://github.com/PapaDragonov"><img src="https://avatars.githubusercontent.com/u/17141028?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>PapaDragonov</b></sub></a></td>
271271
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magentox"><img src="https://avatars.githubusercontent.com/u/44047835?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>magentox</b></sub></a></td>
272+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stasadev"><img src="https://avatars.githubusercontent.com/u/24270994?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Stanislav Zhuk</b></sub></a></td>
273+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Axepih"><img src="https://avatars.githubusercontent.com/u/95623175?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Axepih</b></sub></a></td>
274+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gdemarsico"><img src="https://avatars.githubusercontent.com/u/2066819?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Gastón De Mársico</b></sub></a></td>
272275
</tr>
273276
</tbody>
274277
</table>

app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
15201520
// optimize if using cat index
15211521
$filters = $this->_productLimitationFilters;
15221522
if (isset($filters['category_id']) || isset($filters['visibility'])) {
1523-
$this->getSelect()->order('cat_index.position ' . $dir);
1523+
$this->getSelect()->order(['cat_index.position ' . $dir, 'e.entity_id ' . $dir]);
15241524
} else {
15251525
$this->getSelect()->order('e.entity_id ' . $dir);
15261526
}

app/code/core/Mage/Core/etc/config.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@
310310
<js>
311311
<merge_files>0</merge_files>
312312
</js>
313+
<jquery>
314+
<migrate>0</migrate>
315+
</jquery>
313316
</dev>
314317
<system>
315318
<csrf>

app/code/core/Mage/Core/etc/system.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,24 @@
725725
</merge_css_files>
726726
</fields>
727727
</css>
728+
<jquery translate="label">
729+
<label>jQuery Settings</label>
730+
<sort_order>120</sort_order>
731+
<show_in_default>1</show_in_default>
732+
<show_in_website>1</show_in_website>
733+
<show_in_store>1</show_in_store>
734+
<fields>
735+
<migrate translate="label">
736+
<label>Load jQuery-migration.js</label>
737+
<frontend_type>select</frontend_type>
738+
<source_model>adminhtml/system_config_source_yesno</source_model>
739+
<sort_order>10</sort_order>
740+
<show_in_default>1</show_in_default>
741+
<show_in_website>1</show_in_website>
742+
<show_in_store>1</show_in_store>
743+
</migrate>
744+
</fields>
745+
</jquery>
728746
</groups>
729747
</dev>
730748
<general translate="label" module="core">

app/code/core/Mage/Eav/Model/Config.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,16 @@ protected function _loadEntityAttributes($entityType, $storeId)
224224
{
225225
// preload attributes in array form to avoid instantiating
226226
// models for every attribute even if it is never accessed
227-
$entityAttributes = $entityType->newAttributeCollection()
228-
->addStoreLabel($storeId)
229-
->getData();
227+
$collection = $entityType->newAttributeCollection()
228+
->addStoreLabel($storeId);
229+
230+
// if collection supports per-website values, set website id
231+
if ($collection instanceof Mage_Eav_Model_Resource_Attribute_Collection) {
232+
$websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
233+
$collection->setWebsite($websiteId);
234+
}
235+
236+
$entityAttributes = $collection->getData();
230237

231238
$this->_entityTypeAttributes[$storeId][$entityType->getId()] = [];
232239
$attributeCodes = [];

app/code/core/Mage/Eav/Model/Entity/Type.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ public function newAttributeCollection($setId = null)
140140
*/
141141
protected function _getAttributeCollection()
142142
{
143-
$collection = Mage::getModel('eav/entity_attribute')->getCollection();
143+
$collectionClass = $this->getEntityAttributeCollection();
144+
$collection = Mage::getResourceModel($collectionClass);
144145
$objectsModel = $this->getAttributeModel();
145146
if ($objectsModel) {
146147
$collection->setModel($objectsModel);

0 commit comments

Comments
 (0)