Skip to content

Commit aaa410d

Browse files
committed
Merge branch 'main' into next
2 parents d633770 + 621f21f commit aaa410d

File tree

8 files changed

+52
-28
lines changed

8 files changed

+52
-28
lines changed

.github/workflows/check-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171

7272
- name: Get changed files
7373
id: changed-files-specific
74-
uses: tj-actions/changed-files@v37
74+
uses: tj-actions/changed-files@v38
7575
with:
7676
files: |
7777
composer.*

app/code/core/Mage/Api/Model/Server/Adapter/Jsonrpc.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getController()
6666

6767
if (null === $controller) {
6868
$controller = new Varien_Object(
69-
array('request' => Mage::app()->getRequest(), 'response' => Mage::app()->getResponse())
69+
['request' => Mage::app()->getRequest(), 'response' => Mage::app()->getResponse()]
7070
);
7171

7272
$this->setData('controller', $controller);
@@ -83,10 +83,33 @@ public function run()
8383
{
8484
$this->_jsonRpc = new Zend_Json_Server();
8585
$this->_jsonRpc->setClass($this->getHandler());
86+
87+
// Allow soap_v2 style request.
88+
$request = $this->_jsonRpc->getRequest();
89+
$method = $request->getMethod();
90+
if (!$this->_jsonRpc->getServiceMap()->getService($method)) {
91+
// Convert request to v1 style.
92+
$request->setMethod('call');
93+
$params = $request->getParams();
94+
$sessionId = $params[0] ?? null;
95+
unset($params[0]);
96+
$params = count($params)
97+
? [$sessionId, $method, $params]
98+
: [$sessionId, $method];
99+
$request->setParams($params);
100+
}
101+
86102
$this->getController()->getResponse()
87103
->clearHeaders()
88104
->setHeader('Content-Type', 'application/json; charset=utf8')
89105
->setBody($this->_jsonRpc->handle());
106+
107+
Mage::dispatchEvent('api_server_adapter_jsonrpc_run_after', [
108+
'method' => $method,
109+
'request' => $request,
110+
'response' => $this->_jsonRpc->getResponse()
111+
]);
112+
90113
return $this;
91114
}
92115

app/code/core/Mage/GoogleAnalytics/Helper/Data.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,16 @@ public function isUserIdEnabled($store = null)
176176
*/
177177
public function getLastCategoryName($product): string
178178
{
179-
$_categoryIds = $product->getCategoryIds();
180-
if ($_categoryIds) {
181-
$_lastCat = array_pop($_categoryIds);
182-
$_cat = Mage::getModel('catalog/category')->load($_lastCat);
183-
return $_cat->getName();
184-
}
185-
return '';
179+
$storeRootCategoryId = Mage::app()->getStore()->getRootCategoryId();
180+
$storeRootCategory = Mage::getModel('catalog/category')->load($storeRootCategoryId);
181+
$lastCategory = Mage::getResourceModel('catalog/category_collection')
182+
->addAttributeToSelect('name')
183+
->addIdFilter($product->getCategoryIds())
184+
->addIsActiveFilter()
185+
->addFieldToFilter('path', ['like' => $storeRootCategory->getPath() . "/%"])
186+
->addOrder('level')
187+
->getFirstItem();
188+
return $lastCategory->getName() ?: '';
186189
}
187190

188191
/**

app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,6 @@ public function getCode($type, $code = '')
526526
'0_FCLE' => Mage::helper('usa')->__('First-Class Mail Large Envelope'),
527527
'0_FCL' => Mage::helper('usa')->__('First-Class Mail Letter'),
528528
'0_FCSL' => Mage::helper('usa')->__('First-Class Mail Stamped Letter'),
529-
'0_FCP' => Mage::helper('usa')->__('First-Class Package Service - Retail'),
530529
'0_FCPC' => Mage::helper('usa')->__('First-Class Mail Postcards'),
531530
'1' => Mage::helper('usa')->__('Priority Mail'),
532531
'2' => Mage::helper('usa')->__('Priority Mail Express Hold For Pickup'),
@@ -569,7 +568,6 @@ public function getCode($type, $code = '')
569568
'57' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes'),
570569
'58' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C'),
571570
'59' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C Hold For Pickup'),
572-
'61' => Mage::helper('usa')->__('First-Class Package Service'),
573571
'62' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope'),
574572
'63' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope Hold For Pickup'),
575573
'64' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Padded Flat Rate Envelope'),
@@ -599,13 +597,13 @@ public function getCode($type, $code = '')
599597
'INT_24' => Mage::helper('usa')->__('Priority Mail International DVD Flat Rate priced box'),
600598
'INT_25' => Mage::helper('usa')->__('Priority Mail International Large Video Flat Rate priced box'),
601599
'INT_27' => Mage::helper('usa')->__('Priority Mail Express International Padded Flat Rate Envelope'),
600+
'1058' => Mage::helper('usa')->__('USPS Ground Advantage'),
602601
],
603602

604603
'service_to_code' => [
605604
'0_FCLE' => 'First Class',
606605
'0_FCL' => 'First Class',
607606
'0_FCSL' => 'First Class',
608-
'0_FCP' => 'First Class',
609607
'0_FCPC' => 'First Class',
610608
'1' => 'Priority',
611609
'2' => 'Priority Express',
@@ -648,7 +646,6 @@ public function getCode($type, $code = '')
648646
'57' => 'Priority Express',
649647
'58' => 'Priority',
650648
'59' => 'Priority',
651-
'61' => 'First Class',
652649
'62' => 'Priority Express',
653650
'63' => 'Priority Express',
654651
'64' => 'Priority Express',
@@ -678,6 +675,7 @@ public function getCode($type, $code = '')
678675
'INT_24' => 'Priority',
679676
'INT_25' => 'Priority',
680677
'INT_27' => 'Priority Express',
678+
'1058' => 'Ground Advantage',
681679
],
682680

683681
// Added because USPS has different services but with same CLASSID value, which is "0"
@@ -686,7 +684,6 @@ public function getCode($type, $code = '')
686684
'First-Class Mail Letter' => '0_FCL',
687685
'First-Class Mail Stamped Letter' => '0_FCSL',
688686
'First-Class Mail Metered Letter' => '72',
689-
'First-Class Package Service - Retail' => '0_FCP',
690687
],
691688

692689
'first_class_mail_type' => [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
<usps>
179179
<active>0</active>
180180
<sallowspecific>0</sallowspecific>
181-
<allowed_methods>0_FCLE,0_FCL,0_FCSL,0_FCP,0_FCPC,1,2,3,4,6,7,13,15,16,17,22,23,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,57,58,59,61,62,63,64,72,INT_1,INT_2,INT_4,INT_5,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_17,INT_18,INT_19,INT_20,INT_21,INT_22,INT_23,INT_24,INT_25,INT_27</allowed_methods>
181+
<allowed_methods>0_FCLE,0_FCL,0_FCSL,0_FCPC,1,2,3,4,6,7,13,15,16,17,22,23,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,57,58,59,62,63,64,72,INT_1,INT_2,INT_4,INT_5,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_17,INT_18,INT_19,INT_20,INT_21,INT_22,INT_23,INT_24,INT_25,INT_27,1058</allowed_methods>
182182
<container>VARIABLE</container>
183183
<cutoff_cost/>
184184
<free_method/>

composer.lock

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

docs/EVENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
| adminhtml_widget_grid_filter_collection | 1.9.4.5 |
8282
| after_reindex_process_[getIndexerCode] | 1.9.4.5 |
8383
| ajax_cart_remove_item_success | 1.9.4.5 |
84+
| api_server_adapter_jsonrpc_run_after | 20.1.1 |
8485
| api_user_authenticated | 1.9.4.5 |
8586
| api_user_html_before | 1.9.4.5 |
8687
| application_clean_cache | 1.9.4.5 |
@@ -246,7 +247,7 @@
246247
| newsletter_send_after | 19.5.0 / 20.1.0 |
247248
| on_view_report | 1.9.4.5 |
248249
| order_cancel_after | 1.9.4.5 |
249-
| order_status_changed_before_save | 19.5.0 / 20.1.0 |
250+
| order_status_changed_before_save | 19.5.0 / 20.1.0 |
250251
| page_block_html_topmenu_gethtml_after | 1.9.4.5 |
251252
| page_block_html_topmenu_gethtml_before | 1.9.4.5 |
252253
| payment_form_block_to_html_before | 1.9.4.5 |

js/prototype/prototype.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ function $w(string) {
11111111
return string ? string.split(/\s+/) : [];
11121112
}
11131113

1114-
Array.from = $A;
1114+
Array.from = Array.from || $A;
11151115

11161116

11171117
(function() {

0 commit comments

Comments
 (0)