33 lines
677 B
PHP
33 lines
677 B
PHP
#!/usr/local/bin/php
|
|
<?php
|
|
|
|
$PHABRICATOR_ROOT = dirname(dirname(dirname(__FILE__)));
|
|
require_once $PHABRICATOR_ROOT.'/scripts/__init_script__.php';
|
|
|
|
$viewer = PhabricatorUser::getOmnipotentUser();
|
|
|
|
# print("Querying all files...\n");
|
|
$files = id(new PhabricatorFileQuery())
|
|
->setViewer($viewer)
|
|
->setOrder('oldest')
|
|
->execute();
|
|
|
|
# print("Looping over the files\n");
|
|
print("ids = (\n");
|
|
foreach ($files as $file_id => $file) {
|
|
$authorPHID = $file->getAuthorPHID();
|
|
|
|
if (!$authorPHID) {
|
|
$name = $file->getName();
|
|
if (substr($name, 0, 8) != 'preview-') {
|
|
$prev_file = $file;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
print($file->getID() . ",\n");
|
|
}
|
|
print(")\n");
|
|
|
|
?>
|