diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index c9fa55692..856853150 100644 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -204,7 +204,14 @@ class AclShell extends Shell { $this->_checkArgs(3, 'setParent'); $this->checkNodeType(); extract($this->__dataVars()); - if (!$this->Acl->{$class}->setParent($this->args[2], $this->args[1])) { + $data = array( + $class => array( + 'id' => $this->args[1], + 'parent_id' => $this->args[2] + ) + ); + $this->Acl->{$class}->create(); + if(!$this->Acl->{$class}->save($data)) { $this->out(__("Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.", true), true); } else { $this->out(sprintf(__("Node parent set to %s", true), $this->args[2]) . "\n", true); @@ -367,7 +374,7 @@ class AclShell extends Shell { 'setparent' => "\tsetParent aro|aco \n" . "\t\t" . __("Moves the ACL object specified by beneath the parent ACL object specified by .", true) . "\n" . - "\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n", + "\t\t" . __("To identify the node and parent, use the row id.", true) . "\n", 'getpath' => "\tgetPath aro|aco \n" . "\t\t" . __("Returns the path to the ACL object specified by . This command", true) . "\n" . @@ -493,4 +500,4 @@ class AclShell extends Shell { return $vars; } } -?> \ No newline at end of file +?>