Added support for versioned dataobjects

This commit is contained in:
Martin Pales 2014-10-14 22:11:18 +02:00
parent 5f26b65061
commit a8520420da

View File

@ -202,6 +202,15 @@ class GoogleSitemap {
return $output;
}
else if (Object::has_extension($class, 'Versioned')) {
$table = singleton($class)->baseTable() . '_Live';
if (DB::getConn()->hasTable($table)) {
$instances = Versioned::get_by_stage($class, 'Live');
}
else {
$instances = new DataList($class);
}
}
else {
$instances = new DataList($class);
}