Commit a6a6e5ad authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#174170 by Shiny: different method to insert an action row with default...

#174170 by Shiny: different method to insert an action row with default values, so it works with PostgreSQL too
parent e1022123
......@@ -332,7 +332,7 @@ function actions_save($function, $type, $params, $desc, $aid = NULL) {
else {
// aid is the callback for singleton actions so we need to keep a
// separate table for numeric aids.
db_query('INSERT INTO {actions_aid} () VALUES ()');
db_query('INSERT INTO {actions_aid} VALUES (default)');
$aid = db_last_insert_id('actions_aid', 'aid');
db_query("INSERT INTO {actions} (aid, callback, type, parameters, description) VALUES (%d, '%s', '%s', '%s', '%s')", $aid, $function, $type, $serialized, $desc);
watchdog('actions', 'Action %action created.', array('%action' => $desc));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment