Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098907
D193.id.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
Thu, Aug 14, 7:28 AM
Size
917 B
Mime Type
text/x-diff
Expires
Fri, Aug 15, 7:28 AM (3 h, 17 m)
Engine
blob
Format
Raw Data
Handle
711503
Attached To
D193: MINC-146 - Modernize "orditems:RemoveCouponLink" tag
D193.id.diff
View Options
Index: branches/5.2.x/units/orders/orders_tag_processor.php
===================================================================
--- branches/5.2.x/units/orders/orders_tag_processor.php
+++ branches/5.2.x/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