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(