Allow files to TTL and and be garbage collected
Summary: Added ttl field to files. Gabage collect files with expired ttl Test Plan: created file with a ttl. Let garbage collector run Reviewers: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4987
This commit is contained in:
@@ -89,12 +89,10 @@ final class PhabricatorFileListController extends PhabricatorFileController {
|
||||
$id = $file->getID();
|
||||
$phid = $file->getPHID();
|
||||
$name = $file->getName();
|
||||
|
||||
$file_name = "F{$id} {$name}";
|
||||
$file_uri = $this->getApplicationURI("/info/{$phid}/");
|
||||
|
||||
$date_created = phabricator_date($file->getDateCreated(), $user);
|
||||
|
||||
$author_phid = $file->getAuthorPHID();
|
||||
if ($author_phid) {
|
||||
$author_link = $this->getHandle($author_phid)->renderLink();
|
||||
@@ -110,6 +108,11 @@ final class PhabricatorFileListController extends PhabricatorFileController {
|
||||
->addAttribute($uploaded)
|
||||
->addIcon('none', phabricator_format_bytes($file->getByteSize()));
|
||||
|
||||
$ttl = $file->getTTL();
|
||||
if ($ttl !== null) {
|
||||
$item->addIcon('blame', pht('Temporary'));
|
||||
}
|
||||
|
||||
if (isset($highlighted_ids[$id])) {
|
||||
$item->setEffect('highlighted');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user