2014-05-02 03:23:31 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorSystemRemoveLogWorkflow
|
|
|
|
extends PhabricatorSystemRemoveWorkflow {
|
|
|
|
|
2015-01-15 21:42:07 +01:00
|
|
|
protected function didConstruct() {
|
2014-05-02 03:23:31 +02:00
|
|
|
$this
|
|
|
|
->setName('log')
|
|
|
|
->setSynopsis(pht('Show a log of permanently destroyed objects.'))
|
|
|
|
->setExamples('**log**')
|
|
|
|
->setArguments(array());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
|
|
|
$console = PhutilConsole::getConsole();
|
|
|
|
|
|
|
|
$table = new PhabricatorSystemDestructionLog();
|
|
|
|
foreach (new LiskMigrationIterator($table) as $row) {
|
|
|
|
$console->writeOut(
|
2014-05-02 03:25:30 +02:00
|
|
|
"[%s]\t%s %s\t%s\t%s\n",
|
2014-05-02 03:23:31 +02:00
|
|
|
phabricator_datetime($row->getEpoch(), $this->getViewer()),
|
2014-05-02 03:25:30 +02:00
|
|
|
($row->getRootLogID() ? ' ' : '*'),
|
2014-05-02 03:23:31 +02:00
|
|
|
$row->getObjectClass(),
|
|
|
|
$row->getObjectPHID(),
|
|
|
|
$row->getObjectMonogram());
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|