public function saveAction()
{
try {
- $shout = $_GLOBALS['shout'] = Horde_Registry::appInit('shout');
+ $shout = $GLOBALS['shout'] = Horde_Registry::appInit('shout');
$vars = $this->_vars;
if (!($action = $vars->get('action'))) {
throw new Shout_Exception("Invalid action requested.");
throw new Shout_Exception('Invalid action requested.');
}
$args = array();
- foreach ($action[$action]['args'] as $name => $info) {
+ foreach ($actions[$action]['args'] as $name => $info) {
$args[$name] = $vars->get($name);
}
- $shout->dialplan->saveMenuAction($account, $menu, $action, $args);
+ $shout->dialplan->saveMenuAction($account, $menu, $digit, $action, $args);
} catch (Exception $e) {
//FIXME: Create a way to notify the user of the failure.
Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
'(SELECT id FROM actions WHERE name = ?), ?)';
$yamlargs = Horde_Yaml::dump($args);
$values = array($account, $menu, $digit, $action, $yamlargs);
+ Horde::logMessage("Data: ".print_r($values, true), __FILE__, __LINE__, PEAR_LOG_ERR);
$msg = 'SQL query in Shout_Driver_Sql#saveMenuAction(): ' . $sql;
Horde::logMessage($msg, __FILE__, __LINE__, PEAR_LOG_DEBUG);
$result = $this->_write_db->query($sql, $values);
{
var params = $('editActionForm').serialize(true);
params.menu = menuInfo.get('meta').name;
+ params.action = $('selectActionForm').getElements().first().getValue();
new Ajax.Request(ajax_url + 'saveAction',
{
method: 'post',