Commit 4fad80e5 authored by Dries's avatar Dries
Browse files

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

parent 1ad9afb8
......@@ -986,10 +986,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."));
}
......
......@@ -986,10 +986,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