Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103717778
20180306.opath.03.purge.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
Tue, Mar 4, 06:36
Size
545 B
Mime Type
text/x-php
Expires
Thu, Mar 6, 06:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24632664
Attached To
rPH Phabricator
20180306.opath.03.purge.php
View Options
<?php
$table
=
new
PhabricatorOwnersPath
();
$conn
=
$table
->
establishConnection
(
'w'
);
$seen
=
array
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$path
)
{
$package_id
=
$path
->
getPackageID
();
$repository_phid
=
$path
->
getRepositoryPHID
();
$path_index
=
$path
->
getPathIndex
();
if
(!
isset
(
$seen
[
$package_id
][
$repository_phid
][
$path_index
]))
{
$seen
[
$package_id
][
$repository_phid
][
$path_index
]
=
true
;
continue
;
}
queryfx
(
$conn
,
'DELETE FROM %T WHERE id = %d'
,
$table
->
getTableName
(),
$path
->
getID
());
}
Event Timeline
Log In to Comment