Commit 75d94465 authored by Dries's avatar Dries

- Patch #7638 by nereocystis: fixed PostgreSQL (ANSI SQL) compatibility bug in the comment module.

parent a79313a1
......@@ -1001,10 +1001,10 @@ function comment_mod_matrix($edit) {
db_query("DELETE FROM {moderation_roles} ");
foreach ($edit as $role_id => $votes) {
foreach ($votes as $mid => $value) {
$sql[] = "('$mid', '$role_id', '". ($value ? $value : 0) ."')";
$sql = "('$mid', '$role_id', '". ($value ? $value : 0) ."')";
db_query("INSERT INTO {moderation_roles} (mid, rid, value) VALUES ". $sql);
}
}
db_query("INSERT INTO {moderation_roles} (mid, rid, value) VALUES ". implode(", ", $sql));
drupal_set_message(t("the vote values have been saved."));
}
......
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