Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1097351
D193.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
Tue, Aug 12, 6:32 PM
Size
917 B
Mime Type
text/x-diff
Expires
Wed, Aug 13, 6:32 PM (3 h, 22 s)
Engine
blob
Format
Raw Data
Handle
709472
Attached To
D193: MINC-146 - Modernize "orditems:RemoveCouponLink" tag
D193.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