Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1123668
D538.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, Sep 2, 1:13 PM
Size
3 KB
Mime Type
text/x-diff
Expires
Wed, Sep 3, 1:13 PM (14 h, 38 m)
Engine
blob
Format
Raw Data
Handle
726754
Attached To
D538: MINC-212 Fix notice in the "Entire Order" functionality for the di/coupi/api units
D538.diff
View Options
Index: branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
+++ branches/5.2.x/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
@@ -37,10 +37,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('AffiliatePlanId', $this->Application->GetVar('ap_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -91,4 +92,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- branches/5.2.x/units/coupon_items/coupon_items_event_handler.php
+++ branches/5.2.x/units/coupon_items/coupon_items_event_handler.php
@@ -54,10 +54,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('CouponId', $this->Application->GetVar('coup_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -108,4 +109,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
-}
\ No newline at end of file
+}
Index: branches/5.2.x/units/discount_items/discount_items_event_handler.php
===================================================================
--- branches/5.2.x/units/discount_items/discount_items_event_handler.php
+++ branches/5.2.x/units/discount_items/discount_items_event_handler.php
@@ -104,10 +104,11 @@
*/
function OnEntireOrder($event)
{
- $object = $event->getObject();
+ $object = $event->getObject(array('skip_autoload' => true));
$sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id');
$this->Conn->Query($sql);
+ $object->Clear();
$object->SetDBField('DiscountId', $this->Application->GetVar('d_id'));
$object->SetDBField('ItemResourceId', -1);
$object->SetDBField('ItemType', 0);
@@ -158,4 +159,4 @@
$calculated_fields['']['ItemName'] = 'COALESCE(p.l' . $language_id . '_Name, p.l' . $primary_language_id . '_Name)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
-}
\ No newline at end of file
+}
Event Timeline
Log In to Comment