Merge pull request #36 from ajshort/pull-4
BUG: Fix access to documents on the staging site.
This commit is contained in:
commit
066191ce12
|
@ -804,7 +804,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class DMSDocument_Controller extends ContentController {
|
class DMSDocument_Controller extends Controller {
|
||||||
|
|
||||||
static $testMode = false; //mode to switch for testing. Does not return document download, just document URL
|
static $testMode = false; //mode to switch for testing. Does not return document download, just document URL
|
||||||
|
|
||||||
|
@ -812,6 +812,11 @@ class DMSDocument_Controller extends ContentController {
|
||||||
'index'
|
'index'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public function init() {
|
||||||
|
Versioned::choose_site_stage();
|
||||||
|
parent::init();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the document object from the request object's ID parameter.
|
* Returns the document object from the request object's ID parameter.
|
||||||
* Returns null, if no document found
|
* Returns null, if no document found
|
||||||
|
|
Loading…
Reference in New Issue