Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F950684
20141113.auditdupes.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
598 B
Referenced Files
None
Subscribers
None
20141113.auditdupes.php
View Options
<?php
$table
=
new
PhabricatorRepositoryAuditRequest
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
echo
pht
(
'Removing duplicate Audit requests...'
).
"
\n
"
;
$seen_audit_map
=
array
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$request
)
{
$commit_phid
=
$request
->
getCommitPHID
();
$auditor_phid
=
$request
->
getAuditorPHID
();
if
(
isset
(
$seen_audit_map
[
$commit_phid
][
$auditor_phid
]))
{
$request
->
delete
();
}
if
(!
isset
(
$seen_audit_map
[
$commit_phid
]))
{
$seen_audit_map
[
$commit_phid
]
=
array
();
}
$seen_audit_map
[
$commit_phid
][
$auditor_phid
]
=
1
;
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 2:15 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224320
Default Alt Text
20141113.auditdupes.php (598 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment