public function aco_update($params = array())
{
$root = $this->_checkNode($this->rootNode, $this->rootNode, null);
if (empty($params['plugin'])) {
$controllers = $this->getControllerList();
$this->_updateControllers($root, $controllers);
$plugins = CakePlugin::loaded();
} else {
$plugin = $params['plugin'];
if (!in_array($plugin, App::objects('plugin')) || !CakePlugin::loaded($plugin)) {
$this->err(__('<error>Plugin %s not found or not activated</error>', $plugin));
return false;
}
$plugins = array($params['plugin']);
}
foreach ($plugins as $plugin) {
$controllers = $this->getControllerList($plugin);
$path = $this->rootNode . '/' . $plugin;
$pluginRoot = $this->_checkNode($path, $plugin, $root['Aco']['id']);
$this->_updateControllers($pluginRoot, $controllers, $plugin);
}
$this->out(__('<success>Aco Update Complete</success>'));
return true;
}