mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
commit
e7535a6af6
@ -8,6 +8,10 @@ if (!file_exists(BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR)) {
|
|||||||
user_error('DMS directory named incorrectly. Please install the DMS module into a folder named: ' . DMS_DIR);
|
user_error('DMS directory named incorrectly. Please install the DMS module into a folder named: ' . DMS_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
|
||||||
|
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
|
||||||
|
if (!class_exists('SS_Object')) class_alias('Object', 'SS_Object');
|
||||||
|
|
||||||
CMSMenu::remove_menu_item('DMSDocumentAddController');
|
CMSMenu::remove_menu_item('DMSDocumentAddController');
|
||||||
|
|
||||||
ShortcodeParser::get('default')->register(
|
ShortcodeParser::get('default')->register(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class DMS extends Object implements DMSInterface
|
class DMS extends SS_Object implements DMSInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Folder to store the documents in
|
* Folder to store the documents in
|
||||||
|
@ -132,7 +132,7 @@ class DMSUploadField extends UploadField
|
|||||||
// Search for relations that can hold the uploaded files.
|
// Search for relations that can hold the uploaded files.
|
||||||
if ($relationClass = $this->getRelationAutosetClass()) {
|
if ($relationClass = $this->getRelationAutosetClass()) {
|
||||||
// Create new object explicitly. Otherwise rely on Upload::load to choose the class.
|
// Create new object explicitly. Otherwise rely on Upload::load to choose the class.
|
||||||
$fileObject = Object::create($relationClass);
|
$fileObject = SS_Object::create($relationClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user