mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 09:32:43 +00:00
updating AclShell, added check comand, closes #2780
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6076 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ad95d87d6d
commit
ff8faa5318
2 changed files with 73 additions and 33 deletions
|
@ -439,24 +439,22 @@ class ShellDispatcher {
|
|||
function __parseParams($params) {
|
||||
$count = count($params);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
if(isset($params[$i])) {
|
||||
if ($params[$i]{0} === '-') {
|
||||
$key = substr($params[$i], 1);
|
||||
$this->params[$key] = true;
|
||||
unset($params[$i]);
|
||||
if(isset($params[++$i])) {
|
||||
if ($params[$i]{0} !== '-') {
|
||||
$this->params[$key] = str_replace('"', '', $params[$i]);
|
||||
unset($params[$i]);
|
||||
} else {
|
||||
$i--;
|
||||
$this->__parseParams($params);
|
||||
}
|
||||
if (!empty($params[$i]) && $params[$i]{0} === '-') {
|
||||
$key = substr($params[$i], 1);
|
||||
$this->params[$key] = true;
|
||||
unset($params[$i]);
|
||||
if(isset($params[++$i])) {
|
||||
if (!empty($params[$i]) && $params[$i]{0} !== '-') {
|
||||
$this->params[$key] = str_replace('"', '', $params[$i]);
|
||||
unset($params[$i]);
|
||||
} else {
|
||||
$i--;
|
||||
$this->__parseParams($params);
|
||||
}
|
||||
} else {
|
||||
$this->args[] = $params[$i];
|
||||
unset($params[$i]);
|
||||
}
|
||||
} else {
|
||||
$this->args[] = $params[$i];
|
||||
unset($params[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue