Doing a SELECT on the data table to determine which keys already exist was adding too much extra load to the Account master. This attempts to alleviate that by optimistically trying an UPDATE and if no rows were actually changed by the UPDATE, doing an INSERT instead.
Returns False immediately if trans_id is 0 since this value means no record has been created and therefore the transaction can't have been charged.
Functions charge_pending and get_scheduled used accepted_iter decorator thing which obscured what they were doing. Removed unused function get_scheduled_campaign.
Now has get_all_comments method.
We'll just use LinkVote instead. It'll be slightly inaccurate for one of the two, but it'll be easier to maintain.
The max_num property is used to calculate the width for the .rank element so that listing items line up. This was getting overwritten by Listing.listing(), causing the spotlight items to not line up with the rest of the page.
Returns the default weight of 1 if there's only one day's worth of traffic data since otherwise the weigh function would throw a divide by zero error.
trans_id > 0 is used to identify an authorize transaction in many places in the code and trans_id < 0 is used to identify freebies, so for now the only "special" code is 0 (Also fixes problem with mark_payment_error since ERROR wasn't in the Enum)