diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 791bf47d27fd0bbd95cd26f168b5245de097d784..bee8cbb37facdcca7116aa5770535c5027c7128c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Views 2.x o #441520 by jonathan1055: Allow the "time ago" date format to work on future dates as well. o #445398 by casey: reduce_value_options() using wrong value array. o #451370 by skwashd: base.js had some DOS line endings. + o #454754 by dww: Fix PGSQL related errors with comment author filtering. Other changes: o #298616: Add argument for node updated time similar to node created time. diff --git a/modules/comment/views_handler_argument_comment_user_uid.inc b/modules/comment/views_handler_argument_comment_user_uid.inc index ef72bcb117730a94767601ea140bc7fac742f1ce..f60abed68204d6aaf6c5eda76fdf0cc40497ea36 100644 --- a/modules/comment/views_handler_argument_comment_user_uid.inc +++ b/modules/comment/views_handler_argument_comment_user_uid.inc @@ -36,6 +36,6 @@ class views_handler_argument_comment_user_uid extends views_handler_argument { function query() { $this->ensure_my_table(); - $this->query->add_where(0, "$this->table_alias.uid = %d OR (SELECT COUNT(*) FROM {comments} c WHERE c.uid = %d AND c.nid = $this->table_alias.nid)", $this->argument, $this->argument); + $this->query->add_where(0, "$this->table_alias.uid = %d OR ((SELECT COUNT(*) FROM {comments} c WHERE c.uid = %d AND c.nid = $this->table_alias.nid) > 0)", $this->argument, $this->argument); } } diff --git a/modules/comment/views_handler_filter_comment_user_uid.inc b/modules/comment/views_handler_filter_comment_user_uid.inc index bc88a60dc38beef344715b3ecc10f774a5115ac2..24d882592710af13bef340889b462ce78a665839 100644 --- a/modules/comment/views_handler_filter_comment_user_uid.inc +++ b/modules/comment/views_handler_filter_comment_user_uid.inc @@ -17,7 +17,7 @@ class views_handler_filter_comment_user_uid extends views_handler_filter_user_na $args = array_merge($args, $args); $this->query->add_where($this->options['group'], "$this->table_alias.uid " . $condition . " OR - (SELECT COUNT(*) FROM {comments} c WHERE c.uid " . $condition . " AND c.nid = $this->table_alias.nid)", + ((SELECT COUNT(*) FROM {comments} c WHERE c.uid " . $condition . " AND c.nid = $this->table_alias.nid) > 0)", $args); } }