Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-16 16:49:01 +0300
committerJoas Schilling <coding@schilljs.com>2020-12-15 16:10:52 +0300
commit138221f0a882901f34ec884a503fae90804909e2 (patch)
tree2578251a04c10ec5c3a29ad446591c36cb2c73f3 /lib/Service
parentfb0ee51bd95b37e2bd9ac1dc506942b04daeda32 (diff)
Fix help command handling on Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/CommandService.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Service/CommandService.php b/lib/Service/CommandService.php
index a6b732a6c..1c43f77ca 100644
--- a/lib/Service/CommandService.php
+++ b/lib/Service/CommandService.php
@@ -97,9 +97,6 @@ class CommandService {
*/
public function update(int $id, string $cmd, string $name, string $script, int $response, int $enabled): Command {
$command = $this->mapper->findById($id);
- if ($command->getApp() !== '' || $command->getCommand() === 'help') {
- throw new \InvalidArgumentException('app', 0);
- }
$command->setName($name);
$command->setScript($script);
@@ -141,7 +138,7 @@ class CommandService {
} catch (DoesNotExistException $e) {
throw new \InvalidArgumentException('script', 3);
}
- } else {
+ } elseif ($script !== 'help') {
if (preg_match('/[`\'"]{(?:ARGUMENTS|ROOM|USER)}[`\'"]/i', $script)) {
throw new \InvalidArgumentException('script-parameters', 6);
}