2017-07-01 06:19:01 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-03-10 13:40:19 -05:00
|
|
|
declare(strict_types=1);
|
2017-07-01 06:19:01 -04:00
|
|
|
/**
|
2024-05-24 13:43:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-07-01 06:19:01 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\AdminAudit\Actions;
|
|
|
|
|
|
|
|
|
|
class Console extends Action {
|
|
|
|
|
/**
|
2023-07-07 14:36:21 -04:00
|
|
|
* @param array $arguments
|
2017-07-01 06:19:01 -04:00
|
|
|
*/
|
2021-03-05 09:02:35 -05:00
|
|
|
public function runCommand(array $arguments): void {
|
2019-02-21 14:45:13 -05:00
|
|
|
if (!isset($arguments[1]) || $arguments[1] === '_completion') {
|
2017-07-01 06:19:01 -04:00
|
|
|
// Don't log autocompletion
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove `./occ`
|
|
|
|
|
array_shift($arguments);
|
|
|
|
|
|
|
|
|
|
$this->log('Console command executed: %s',
|
|
|
|
|
['arguments' => implode(' ', $arguments)],
|
|
|
|
|
['arguments']
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|