mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Fixed phrases import from old system to the new one
This commit is contained in:
@@ -312,12 +312,15 @@ class PhrasesLib
|
||||
// If an error occurred then exit
|
||||
if ($line === false && !feof($srcFileHandle)) return false;
|
||||
|
||||
// Search for the end of the array
|
||||
if (stristr($line, ');'))
|
||||
// If the first phrase or the end of the array
|
||||
if ($line == '$phrases = array();' || stristr($line, ');'))
|
||||
{
|
||||
$first_coma = ',';
|
||||
if ($line == '$phrases = array();') $first_coma = '';
|
||||
|
||||
// If found then append the new phrase to the current line
|
||||
// and replace the end of the array
|
||||
$line = str_replace(');', ",\n".var_export($phrase, true)."\n".');', $line);
|
||||
$line = str_replace(');', $first_coma."\n".var_export($phrase, true)."\n".');', $line);
|
||||
}
|
||||
|
||||
// In any case copy the line to the temp file
|
||||
@@ -345,7 +348,7 @@ class PhrasesLib
|
||||
{
|
||||
return !(file_put_contents(
|
||||
$phrasesCategoryFile,
|
||||
'<?php'."\n\n".'$phrases = array('."\n".');'
|
||||
'<?php'."\n\n".'$phrases = array();'
|
||||
) === false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
$phrases = array(
|
||||
array (
|
||||
'app' => 'core',
|
||||
'category' => 'extensions',
|
||||
'phrase' => 'title',
|
||||
'insertvon' => 'system',
|
||||
'phrases' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'sprache' => 'German',
|
||||
'text' => 'Extensions manager',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'sprache' => 'English',
|
||||
'text' => 'Extensions manager',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
),
|
||||
)
|
||||
,
|
||||
array (
|
||||
'app' => 'core',
|
||||
'category' => 'extensions',
|
||||
'phrase' => 'uploadExtension',
|
||||
'insertvon' => 'system',
|
||||
'phrases' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'sprache' => 'German',
|
||||
'text' => 'Upload extensions package',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'sprache' => 'English',
|
||||
'text' => 'Upload extensions package',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
),
|
||||
)
|
||||
,
|
||||
array (
|
||||
'app' => 'core',
|
||||
'category' => 'extensions',
|
||||
'phrase' => 'performSql',
|
||||
'insertvon' => 'system',
|
||||
'phrases' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'sprache' => 'German',
|
||||
'text' => 'Execute SQL?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'sprache' => 'English',
|
||||
'text' => 'Execute SQL?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
),
|
||||
)
|
||||
,
|
||||
array (
|
||||
'app' => 'core',
|
||||
'category' => 'extensions',
|
||||
'phrase' => 'changeSuccess',
|
||||
'insertvon' => 'system',
|
||||
'phrases' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'sprache' => 'German',
|
||||
'text' => 'Changes applied successfully',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'sprache' => 'English',
|
||||
'text' => 'Changes applied successfully',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
),
|
||||
)
|
||||
,
|
||||
array (
|
||||
'app' => 'core',
|
||||
'category' => 'extensions',
|
||||
'phrase' => 'changeError',
|
||||
'insertvon' => 'system',
|
||||
'phrases' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'sprache' => 'German',
|
||||
'text' => 'An error occurred while applying the changes',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'sprache' => 'English',
|
||||
'text' => 'An error occurred while applying the changes',
|
||||
'description' => '',
|
||||
'insertvon' => 'system',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user