--- modules/comment/views_handler_argument_comment_user_uid.inc 2010-12-24 17:48:01.000000000 -0500 +++ modules/comment/views_handler_argument_comment_user_uid.inc 2010-12-24 17:47:22.000000000 -0500 @@ -1,5 +1,5 @@ ensure_my_table(); - - $nid_alias = $this->query->add_field('node', 'nid'); - - $subselect = db_select('comment', 'c'); - $subselect->addField('c', 'cid'); - // @TODO: Figure out why condition/placeholders doesn't work here. - $subselect->where("c.uid = $this->argument"); - $subselect->where("c.nid = $nid_alias"); - $subselect = $subselect->countQuery(); - $subselect->preExecute(); - +$subselect = "(SELECT COUNT(*) FROM comment c WHERE c.uid = 1 AND c.nid = node.nid)"; $condition = db_or() ->condition("$this->table_alias.uid", $this->argument, '=') - ->where("0 < (" . (string) $subselect . ")"); - + ->where("0 < (" . (string) $subselect . ")"); $this->query->add_where(0, $condition); } }