Skip to content
Snippets Groups Projects
Commit 313641eb authored by Jared Hancock's avatar Jared Hancock
Browse files

cli: Fix incorrect option parsing

This fixes a regression in the option parsing where --setup would be
interpreted as --setup -e -t -u -p

Also, some parts of osTicket, like internationalization and plugins need
read access to a directory in order to get a list of installed plugins and
language packs.
parent a7d44f82
No related branches found
No related tags found
No related merge requests found
......@@ -265,7 +265,7 @@ class Module {
continue;
}
// Allow multiple simple args like -Dvt
if ($arg[0] == '-' && strlen($arg) > 2) {
if ($arg[0] == '-' && $arg[1] != '-' && strlen($arg) > 2) {
foreach (str_split(substr($arg, 2)) as $O)
array_unshift($argv, "-{$O}");
$arg = substr($arg, 0, 2);
......
......@@ -202,7 +202,7 @@ class Deployment extends Unpacker {
if ($dryrun)
continue;
if (!is_dir(dirname($dst)))
mkdir(dirname($dst), 0751, true);
mkdir(dirname($dst), 0755, true);
$this->copyFile($src, $dst, $hash, octdec($mode));
}
}
......
......@@ -173,7 +173,7 @@ class Unpacker extends Module {
if ($dryrun)
continue;
if (!is_dir($destination))
mkdir($destination, 0751, true);
mkdir($destination, 0755, true);
$this->copyFile($file, $target, $hash);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment