code/extensions/BlogPostFilter.php
public function augmentSQL(SQLQuery &$query) {
		$stage = Versioned::current_stage();
		if($stage == 'Live' || !Permission::check("VIEW_DRAFT_CONTENT")) {
			$query->addWhere("PublishDate < '" . Convert::raw2sql(SS_Datetime::now()) . "'");
		}
	}
public function augmentSQL(SQLQuery &$query) {
		$stage = Versioned::current_stage();
		if($stage == 'Live' || !Permission::check("VIEW_DRAFT_CONTENT")) {
			$query->addWhere("PublishDate < '" . Convert::raw2sql(SS_Datetime::now()) . "'");
		}
	}
Augment queries so that we don't fetch unpublished articles.