In order to allow embargo/expiry on Blog posts I changed (with advice from Simon_w) BlogHolder.php (line 94)
from:
return DataObject::get("Page","`ParentID` = $this->ID $tagCheck $dateCheck","`BlogEntry`.Date DESC",'',"$limit");
to:
$items = DataObject::get("Page","`ParentID` = $this->ID $tagCheck $dateCheck","`BlogEntry`.Date DESC");
$newSet = new DataObjectSet();
foreach($items as $item) {
if($item->canView()) $newSet->push($item);
}
if($limit) {
list($start, $length) = split(' *, *', $limit);
if(!$length) {
return $newSet->getRange(0, $start);
}
return $newSet->getRange($start, $length);
}
return $newSet;
This code made the pagination disappear and I'd really like it back. The code forces the blog posts through the canView function.
I'm running blog 0.2.1 on SS 2.3.3