Seriously-Simple-Podcasting
Seriously-Simple-Podcasting copied to clipboard
Three month stat display isn't specific to the year
When looking at the podcast_stats page, stats for the last three months per episode are listed. However the month headings aren't specific to the year, so an episode which received no listens today (November) is showing listens because there were listens last November.
The object which tallies these is classes/class-all-episode-stats.php
and the code block is:
$sql= "SELECT `date` FROM $this->table WHERE `post_id` = '" . $result->post_id . "'";
$episode_results = $wpdb->get_results( $sql );
$lifetime_count = count( $episode_results );
foreach ( $episode_results as $ref ) {
//Increase the count of listens per month
if ( isset( $total_listens_array[ intval( date( 'm', intval( $ref->date ) ) ) ] ) ) {
++ $total_listens_array[ intval( date( 'm', intval( $ref->date ) ) ) ];
}
}
…I think this is in the stats code, not in SSP itself? We have an open issue for it already:
https://github.com/CastosHQ/Seriously-Simple-Stats/issues/74
Gah, yeah, you are absolutely right. I didn't dig far enough to see there was a separate project.