Page MenuHomePhabricator

D13901.id33557.diff
No OneTemporary

D13901.id33557.diff

diff --git a/src/applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php
--- a/src/applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php
+++ b/src/applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php
@@ -7,11 +7,18 @@
$this
->setName('volume')
->setSynopsis(
- pht('Show how much mail users have received in the last 30 days.'))
+ pht('Show how much mail users have received in the last n days.'))
->setExamples(
'**volume**')
->setArguments(
array(
+ array(
+ 'name' => 'days',
+ 'param' => 'days',
+ 'default' => 30,
+ 'help' => pht(
+ 'Number of days back (default 30).'),
+ ),
));
}
@@ -19,7 +26,7 @@
$console = PhutilConsole::getConsole();
$viewer = $this->getViewer();
- $since = (PhabricatorTime::getNow() - phutil_units('30 days in seconds'));
+ $since = (PhabricatorTime::getNow() - $args->getArg('days') * 86400);
$until = PhabricatorTime::getNow();
$mails = id(new PhabricatorMetaMTAMailQuery())
@@ -95,7 +102,7 @@
$table->draw();
echo "\n";
- echo pht('Mail sent in the last 30 days.')."\n";
+ echo pht('Mail sent in the last %d days.', $args->getArg('days'))."\n";
echo pht(
'"Unfiltered" is raw volume before rules applied.')."\n";
echo pht(

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 31, 8:47 AM (4 w, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
11757878
Default Alt Text
D13901.id33557.diff (1 KB)

Event Timeline