Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93481289
20171101.diff.02.populate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 02:43
Size
571 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 02:43 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22647105
Attached To
rPH Phabricator
20171101.diff.02.populate.php
View Options
<?php
$table
=
new
DifferentialRevision
();
$conn
=
$table
->
establishConnection
(
'w'
);
$diff_table
=
new
DifferentialDiff
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$revision
)
{
$revision_id
=
$revision
->
getID
();
$diff_row
=
queryfx_one
(
$conn
,
'SELECT phid FROM %T WHERE revisionID = %d ORDER BY id DESC LIMIT 1'
,
$diff_table
->
getTableName
(),
$revision_id
);
if
(
$diff_row
)
{
queryfx
(
$conn
,
'UPDATE %T SET activeDiffPHID = %s WHERE id = %d'
,
$table
->
getTableName
(),
$diff_row
[
'phid'
],
$revision_id
);
}
}
Event Timeline
Log In to Comment