diff --git a/src/Models/Model_Post_QueryBuilder.php b/src/Models/Model_Post_QueryBuilder.php index 0828fce9..fddc2f33 100644 --- a/src/Models/Model_Post_QueryBuilder.php +++ b/src/Models/Model_Post_QueryBuilder.php @@ -216,6 +216,25 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder return self::filterTokenFav($dbQuery, $val); } + protected static function filterTokenComment($dbQuery, $val) + { + $dbQuery + ->exists() + ->open() + ->select('1') + ->from('comment') + ->innerJoin('user') + ->on('commenter_id = user.id') + ->where('post_id = post.id') + ->and('user.name = ?')->put($val) + ->close(); + } + + protected static function filterTokenCommenter($dbQuery, $val) + { + return self::filterTokenComment($dbQuery, $val); + } + protected static function filterTokenSubmit($dbQuery, $val) { $dbQuery diff --git a/src/Views/index-help.phtml b/src/Views/index-help.phtml index 0c1a5b51..e8da7adc 100644 --- a/src/Views/index-help.phtml +++ b/src/Views/index-help.phtml @@ -22,6 +22,7 @@
  • uploaded by David: submit:David (note no spaces)
  • favorited by David: fav:David
  • favorited by at least four users: favmin:4
  • +
  • commented by David: comment:David
  • commented by at least three users: commentmin:3
  • having minimum score of 4: scoremin:4
  • tagged with at least seven tags: tagmin:7