Commit 6a5e4bca authored by Stefan Galinski's avatar Stefan Galinski

Merge branch 'master' into 'master'

[BUGFIX] Make FileService PHP7 compatible



See merge request !9
parents 54757ce4 d4f55cd9
......@@ -365,13 +365,13 @@ class ConfigurationService extends AbstractService {
}
/** @var \SGalinski\Lfeditor\Service\FileService $originalFileObject */
$originalFileObject = $this->objectManager->get($className);
$originalFileObject->init($langFile, $extPath);
$originalFileObject->init($langFile, $extPath, '');
try {
if ($this->session->getDataByKey('editingMode') === 'override') {
/** @var FileOverrideService $overrideFileObj */
$overrideFileObj = $this->objectManager->get('SGalinski\Lfeditor\Service\FileOverrideService');
$overrideFileObj->init($originalFileObject);
$overrideFileObj->init($originalFileObject, '', '');
$this->fileObj = $overrideFileObj;
} else {
$this->fileObj = $originalFileObject;
......@@ -719,4 +719,4 @@ class ConfigurationService extends AbstractService {
}
return $languages;
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ class FileBackupService extends FileService {
public function init($file, $path, $metaFile) {
// init
$this->setVar(array('metaFile' => $metaFile));
parent::init($file, $path);
parent::init($file, $path, $metaFile);
// read meta file
try {
......
......@@ -41,9 +41,9 @@ class FileBasePHPService extends FileBaseService {
* @param string $path path to the file
* @return void
*/
public function init($file, $path) {
public function init($file, $path, $metaFile) {
$this->setVar(array('fileType' => 'php'));
parent::init($file, $path);
parent::init($file, $path, $metaFile);
}
/**
......
......@@ -71,7 +71,7 @@ abstract class FileBaseService extends FileService {
* @param string $path path to the file
* @return void
*/
public function init($file, $path) {
public function init($file, $path, $metaFile) {
if (class_exists('TYPO3\CMS\Core\Localization\Locales')) {
/** @var $locales Locales */
$locales = GeneralUtility::makeInstance('TYPO3\CMS\Core\Localization\Locales');
......@@ -86,7 +86,7 @@ abstract class FileBaseService extends FileService {
}
$this->setWorkspace('base');
parent::init($file, $path);
parent::init($file, $path, $metaFile);
$this->prepareLanguageFilesForFirstUsage();
}
......
......@@ -43,9 +43,9 @@ class FileBaseXLFService extends FileBaseService {
* @param string $path path to the file
* @return void
*/
public function init($file, $path) {
public function init($file, $path, $metaFile) {
$this->setFileType('xlf');
parent::init($file, $path);
parent::init($file, $path, $metaFile);
}
/**
......
......@@ -45,9 +45,9 @@ class FileBaseXMLService extends FileBaseService {
* @param string $path path to the file
* @return void
*/
public function init($file, $path) {
public function init($file, $path, $metaFile) {
$this->setVar(array('fileType' => 'xml'));
parent::init($file, $path);
parent::init($file, $path, $metaFile);
}
/**
......
......@@ -47,7 +47,7 @@ class FileOverrideService extends FileBaseXMLService {
* @param FileService $originalFileObject
* @return void
*/
public function init(FileService $originalFileObject) {
public function init($originalFileObject, $path, $metaFile) {
try {
$typo3ExtRelativeFilePath = Typo3Lib::transTypo3File($originalFileObject->getAbsFile(), FALSE);
} catch (\Exception $e) {
......@@ -70,7 +70,7 @@ class FileOverrideService extends FileBaseXMLService {
}
$this->originalFileObject = $originalFileObject;
parent::init(basename($overrideFileAbsolutePath), dirname($overrideFileAbsolutePath));
parent::init(basename($overrideFileAbsolutePath), dirname($overrideFileAbsolutePath), $metaFile);
}
/**
......
......@@ -98,7 +98,7 @@ abstract class FileService extends AbstractService {
* @param string $path absolute path to the extension or language file
* @return void
*/
public function init($file, $path) {
public function init($file, $path, $metaFile) {
$this->setAbsPath($path);
$this->setRelFile($file);
$this->setAbsFile($this->absPath . '/' . $this->relFile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment