Created
February 25, 2022 16:19
-
-
Save mecmartini/346dc98eb87ad307ea3e3c3a555aef19 to your computer and use it in GitHub Desktop.
drupal_content_synchronizer-fix_STATUS_PERMANENT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Base/JsonWriterTrait.php b/src/Base/JsonWriterTrait.php | |
index c4481f0..4116395 100644 | |
--- a/src/Base/JsonWriterTrait.php | |
+++ b/src/Base/JsonWriterTrait.php | |
@@ -35,7 +35,7 @@ trait JsonWriterTrait { | |
File::create([ | |
'uri' => $uri, | |
- 'status' => FileInterface::STATUS_PERMANENT, | |
+ 'status' => defined('FILE_STATUS_PERMANENT') ? FILE_STATUS_PERMANENT : FileInterface::STATUS_PERMANENT, | |
])->save(); | |
} | |
diff --git a/src/Service/ContentSynchronizerManager.php b/src/Service/ContentSynchronizerManager.php | |
index aa76795..27e1c6e 100644 | |
--- a/src/Service/ContentSynchronizerManager.php | |
+++ b/src/Service/ContentSynchronizerManager.php | |
@@ -106,7 +106,7 @@ class ContentSynchronizerManager { | |
$this->fileSystem->chmod($uri, 775); | |
$file = File::create([ | |
'uri' => $uri, | |
- 'status' => FILE_STATUS_PERMANENT, | |
+ 'status' => defined('FILE_STATUS_PERMANENT') ? FILE_STATUS_PERMANENT : FileInterface::STATUS_PERMANENT, | |
]); | |
if ($file) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment