Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112972734
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
Wed, May 14, 04:40
Size
545 B
Mime Type
text/x-php
Expires
Fri, May 16, 04:40 (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
26137466
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