Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1168586
D193.id479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Sep 24, 10:26 PM
Size
932 B
Mime Type
text/x-diff
Expires
Thu, Sep 25, 10:26 PM (4 h, 44 m)
Engine
blob
Format
Raw Data
Handle
757032
Attached To
D193: MINC-146 - Modernize "orditems:RemoveCouponLink" tag
D193.id479.diff
View Options
Index: modules/in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- modules/in-commerce/units/orders/orders_tag_processor.php
+++ modules/in-commerce/units/orders/orders_tag_processor.php
@@ -1459,14 +1459,18 @@
*/
function RemoveCouponLink($params)
{
- $type = strtolower($params['type']);
- $url_params = Array (
- 'pass' => 'm,ord',
- 'ord_event' => ($type == 'coupon') ? 'OnRemoveCoupon' : 'OnRemoveGiftCertificate',
- 'm_cat_id' => 0,
- );
+ if ( !isset($params['pass']) ) {
+ $params['pass'] = 'm,ord';
+ }
+
+ $params['m_cat_id'] = 0;
+
+ $link_type = $params['type'];
+ unset($params['type']);
+
+ $params['ord_event'] = strtolower($link_type) == 'coupon' ? 'OnRemoveCoupon' : 'OnRemoveGiftCertificate';
- return $this->Application->HREF('', '', $url_params);
+ return $this->ItemLink($params);
}
/**
Event Timeline
Log In to Comment