Skip to content

Commit

Permalink
Merge branch 'next' into tinymce6
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Aug 29, 2023
2 parents b832fc5 + aaa410d commit b8b39a3
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v37
uses: tj-actions/changed-files@v38
with:
files: |
composer.*
Expand Down
25 changes: 24 additions & 1 deletion app/code/core/Mage/Api/Model/Server/Adapter/Jsonrpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getController()

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

$this->setData('controller', $controller);
Expand All @@ -83,10 +83,33 @@ public function run()
{
$this->_jsonRpc = new Zend_Json_Server();
$this->_jsonRpc->setClass($this->getHandler());

// Allow soap_v2 style request.
$request = $this->_jsonRpc->getRequest();
$method = $request->getMethod();
if (!$this->_jsonRpc->getServiceMap()->getService($method)) {
// Convert request to v1 style.
$request->setMethod('call');
$params = $request->getParams();
$sessionId = $params[0] ?? null;
unset($params[0]);
$params = count($params)
? [$sessionId, $method, $params]
: [$sessionId, $method];
$request->setParams($params);
}

$this->getController()->getResponse()
->clearHeaders()
->setHeader('Content-Type', 'application/json; charset=utf8')
->setBody($this->_jsonRpc->handle());

Mage::dispatchEvent('api_server_adapter_jsonrpc_run_after', [
'method' => $method,
'request' => $request,
'response' => $this->_jsonRpc->getResponse()
]);

return $this;
}

Expand Down
17 changes: 10 additions & 7 deletions app/code/core/Mage/GoogleAnalytics/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,16 @@ public function isUserIdEnabled($store = null)
*/
public function getLastCategoryName($product): string
{
$_categoryIds = $product->getCategoryIds();
if ($_categoryIds) {
$_lastCat = array_pop($_categoryIds);
$_cat = Mage::getModel('catalog/category')->load($_lastCat);
return $_cat->getName();
}
return '';
$storeRootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$storeRootCategory = Mage::getModel('catalog/category')->load($storeRootCategoryId);
$lastCategory = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('name')
->addIdFilter($product->getCategoryIds())
->addIsActiveFilter()
->addFieldToFilter('path', ['like' => $storeRootCategory->getPath() . "/%"])
->addOrder('level')
->getFirstItem();
return $lastCategory->getName() ?: '';
}

/**
Expand Down
7 changes: 2 additions & 5 deletions app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ public function getCode($type, $code = '')
'0_FCLE' => Mage::helper('usa')->__('First-Class Mail Large Envelope'),
'0_FCL' => Mage::helper('usa')->__('First-Class Mail Letter'),
'0_FCSL' => Mage::helper('usa')->__('First-Class Mail Stamped Letter'),
'0_FCP' => Mage::helper('usa')->__('First-Class Package Service - Retail'),
'0_FCPC' => Mage::helper('usa')->__('First-Class Mail Postcards'),
'1' => Mage::helper('usa')->__('Priority Mail'),
'2' => Mage::helper('usa')->__('Priority Mail Express Hold For Pickup'),
Expand Down Expand Up @@ -569,7 +568,6 @@ public function getCode($type, $code = '')
'57' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes'),
'58' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C'),
'59' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C Hold For Pickup'),
'61' => Mage::helper('usa')->__('First-Class Package Service'),
'62' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope'),
'63' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope Hold For Pickup'),
'64' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Padded Flat Rate Envelope'),
Expand Down Expand Up @@ -599,13 +597,13 @@ public function getCode($type, $code = '')
'INT_24' => Mage::helper('usa')->__('Priority Mail International DVD Flat Rate priced box'),
'INT_25' => Mage::helper('usa')->__('Priority Mail International Large Video Flat Rate priced box'),
'INT_27' => Mage::helper('usa')->__('Priority Mail Express International Padded Flat Rate Envelope'),
'1058' => Mage::helper('usa')->__('USPS Ground Advantage'),
],

'service_to_code' => [
'0_FCLE' => 'First Class',
'0_FCL' => 'First Class',
'0_FCSL' => 'First Class',
'0_FCP' => 'First Class',
'0_FCPC' => 'First Class',
'1' => 'Priority',
'2' => 'Priority Express',
Expand Down Expand Up @@ -648,7 +646,6 @@ public function getCode($type, $code = '')
'57' => 'Priority Express',
'58' => 'Priority',
'59' => 'Priority',
'61' => 'First Class',
'62' => 'Priority Express',
'63' => 'Priority Express',
'64' => 'Priority Express',
Expand Down Expand Up @@ -678,6 +675,7 @@ public function getCode($type, $code = '')
'INT_24' => 'Priority',
'INT_25' => 'Priority',
'INT_27' => 'Priority Express',
'1058' => 'Ground Advantage',
],

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

'first_class_mail_type' => [
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Usa/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<usps>
<active>0</active>
<sallowspecific>0</sallowspecific>
<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>
<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>
<container>VARIABLE</container>
<cutoff_cost/>
<free_method/>
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

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

3 changes: 2 additions & 1 deletion docs/EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
| adminhtml_widget_grid_filter_collection | 1.9.4.5 |
| after_reindex_process_[getIndexerCode] | 1.9.4.5 |
| ajax_cart_remove_item_success | 1.9.4.5 |
| api_server_adapter_jsonrpc_run_after | 20.1.1 |
| api_user_authenticated | 1.9.4.5 |
| api_user_html_before | 1.9.4.5 |
| application_clean_cache | 1.9.4.5 |
Expand Down Expand Up @@ -246,7 +247,7 @@
| newsletter_send_after | 19.5.0 / 20.1.0 |
| on_view_report | 1.9.4.5 |
| order_cancel_after | 1.9.4.5 |
| order_status_changed_before_save | 19.5.0 / 20.1.0 |
| order_status_changed_before_save | 19.5.0 / 20.1.0 |
| page_block_html_topmenu_gethtml_after | 1.9.4.5 |
| page_block_html_topmenu_gethtml_before | 1.9.4.5 |
| payment_form_block_to_html_before | 1.9.4.5 |
Expand Down
2 changes: 1 addition & 1 deletion js/prototype/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ function $w(string) {
return string ? string.split(/\s+/) : [];
}

Array.from = $A;
Array.from = Array.from || $A;


(function() {
Expand Down

0 comments on commit b8b39a3

Please sign in to comment.