From 63e0417363d2701d6f9c72fd88eefa4ab8eaa2b9 Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Thu, 3 Oct 2013 23:54:40 +1000 Subject: [PATCH] Extend content controller to make sure the correct stage is used. The staging system is initialised inside ContentController::init(). As the DMS serving bypassed this, the stage was not set correctly, meaning permissions were not always correctly applied. --- code/DMSDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/DMSDocument.php b/code/DMSDocument.php index 4c823cb..b0b2c4c 100755 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -804,7 +804,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { } -class DMSDocument_Controller extends Controller { +class DMSDocument_Controller extends ContentController { static $testMode = false; //mode to switch for testing. Does not return document download, just document URL