Move common comment code into BaseComment.

Review Request #3149 — Created June 17, 2012 and submitted — Latest diff uploaded

Information

Review Board

Reviewers

Move common comment code into BaseComment.

BaseComment is a nice base class, but wasn't doing enough. In order to
simplify maintenance, the reply_to, timestamp, text, and objects
variables and the public_replies, get_review_url, and __unicode__
functions have been moved into BaseComment.

This also introduces a get_review_request function, which is used
instead of calling self.review.get().review_request. If the
_review_request variable is assigned on the comment, it will be returned
instead, which skips a couple of otherwise necessary queries.
Unit tests pass. The review request page still works correctly.