Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1949737
addresses_item.php
No One
Temporary
Actions
Download 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, Oct 29, 7:24 AM
Size
436 B
Mime Type
text/x-php
Expires
Sat, Oct 31, 7:24 AM (1 d, 16 h)
Engine
blob
Format
Raw Data
Handle
963137
Attached To
rMINC Modules.In-Commerce
addresses_item.php
View Options
<?php
class
AddressesItem
extends
kDBItem
{
function
MarkAddress
(
$address_type
,
$update_record
=
true
)
{
$user_id
=
$this
->
Application
->
RecallVar
(
'user_id'
);
$sql
=
'UPDATE '
.
$this
->
TableName
.
'
SET LastUsedAs'
.
$address_type
.
' = 0
WHERE PortalUserId = '
.
$user_id
;
$this
->
Conn
->
Query
(
$sql
);
$this
->
SetDBField
(
'LastUsedAs'
.
$address_type
,
1
);
return
$update_record
?
$this
->
Update
()
:
true
;
}
}
?>
Event Timeline
Log In to Comment