Commit 1a046a9d authored by Manfred Kutas's avatar Manfred Kutas

ZP-1165 Added days-ago as an alias for days-old option.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 79602d24
......@@ -152,7 +152,7 @@ class ZPushAdminCLI {
if (self::$errormessage)
return;
$options = getopt("u:d:a:t:", array('user:', 'device:', 'action:', 'type:', 'days-old:'));
$options = getopt("u:d:a:t:", array('user:', 'device:', 'action:', 'type:', 'days-old:', 'days-ago:'));
// get 'user'
if (isset($options['u']) && !empty($options['u']))
......@@ -179,6 +179,9 @@ class ZPushAdminCLI {
elseif (isset($options['type']) && !empty($options['type']))
self::$type = strtolower(trim($options['type']));
if (isset($options['days-ago']) && !empty($options['days-ago'])) {
$options['days-old'] = $options['days-ago'];
}
if (isset($options['days-old']) && !empty($options['days-old'])) {
if (!is_numeric($options['days-old']) || $options['days-old'] < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment