summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2009-06-02 18:50:56 (GMT)
committer Earl Miles2009-06-02 18:50:56 (GMT)
commitddd56a7bc2a278a5afc79ca8dece31816fd19631 (patch)
tree5d67cb5bf7463b264fd78ef25b5a1a70a33cf3c4
parentc6d7372ffd435296362cc5ee4f88d1a034b8340f (diff)
#454754 by dww: Fix PGSQL related errors with comment author filtering.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--modules/comment/views_handler_argument_comment_user_uid.inc2
-rw-r--r--modules/comment/views_handler_filter_comment_user_uid.inc2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 791bf47..bee8cbb 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 ef72bcb..f60abed 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 bc88a60..24d8825 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);
}
}