Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christoph
lfeditor
Commits
3f57e056
Commit
3f57e056
authored
Mar 15, 2016
by
Markus Klein
Browse files
[BUGFIX] Make FileService PHP7 compatible
parent
96746114
Changes
8
Hide whitespace changes
Inline
Side-by-side
Classes/Service/ConfigurationService.php
View file @
3f57e056
...
...
@@ -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
Classes/Service/FileBackupService.php
View file @
3f57e056
...
...
@@ -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
{
...
...
Classes/Service/FileBasePHPService.php
View file @
3f57e056
...
...
@@ -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
);
}
/**
...
...
Classes/Service/FileBaseService.php
View file @
3f57e056
...
...
@@ -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
();
}
...
...
Classes/Service/FileBaseXLFService.php
View file @
3f57e056
...
...
@@ -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
);
}
/**
...
...
Classes/Service/FileBaseXMLService.php
View file @
3f57e056
...
...
@@ -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
);
}
/**
...
...
Classes/Service/FileOverrideService.php
View file @
3f57e056
...
...
@@ -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
);
}
/**
...
...
Classes/Service/FileService.php
View file @
3f57e056
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment