From e0abe231d988bf1605c76f7d37221400e32be77b Mon Sep 17 00:00:00 2001 From: Uncle Cheese Date: Tue, 4 Feb 2014 20:00:05 +1300 Subject: [PATCH] Versioned awareness in DashboardModelAdminPanel --- code/panels/DashboardModelAdminPanel.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/panels/DashboardModelAdminPanel.php b/code/panels/DashboardModelAdminPanel.php index 64ba968..4502f6a 100644 --- a/code/panels/DashboardModelAdminPanel.php +++ b/code/panels/DashboardModelAdminPanel.php @@ -216,6 +216,10 @@ public function PluralModelName() { */ public function ModelAdminItems() { if($this->ModelAdminModel) { + $SNG= Injector::inst()->get($this->ModelAdminModel); + if($SNG->hasExtension("Versioned")) { + Versioned::reading_stage("Stage"); + } $records = DataList::create($this->ModelAdminModel) ->limit($this->Count) ->sort("LastEdited DESC");