Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101381169
20160223.paste.fileedges.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
Sun, Feb 9, 21:47
Size
545 B
Mime Type
text/x-php
Expires
Tue, Feb 11, 21:47 (2 d)
Engine
blob
Format
Raw Data
Handle
24148526
Attached To
rPH Phabricator
20160223.paste.fileedges.php
View Options
<?php
// For a while in November 2015, attachment edges between pastes and their
// underlying file data were not written correctly. This restores edges for
// any missing pastes.
$table
=
new
PhabricatorPaste
();
$edge_type
=
PhabricatorObjectHasFileEdgeType
::
EDGECONST
;
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$paste
)
{
$paste_phid
=
$paste
->
getPHID
();
$file_phid
=
$paste
->
getFilePHID
();
if
(!
$file_phid
)
{
continue
;
}
id
(
new
PhabricatorEdgeEditor
())
->
addEdge
(
$paste_phid
,
$edge_type
,
$file_phid
)
->
save
();
}
Event Timeline
Log In to Comment