Changed phrase_settings.py to phrase-settings.json and added migration function for old php settings file.

This commit is contained in:
AntoJvlt
2021-03-22 00:07:55 +01:00
parent 1a93319093
commit 6d56cbb3e8
8 changed files with 246 additions and 39 deletions

View File

@@ -1,9 +1,16 @@
<?php
$phpPhraseSettingsFile = $argv[1];
<<<<<<< HEAD
$jsonPhraseSettingsFile = dirname($phpPhraseSettingsFile).'/'.basename($phpPhraseSettingsFile, '.php').'.json';
if (file_exists($phpPhraseSettingsFile) && !file_exists($jsonPhraseSettingsFile)) {
=======
$jsonPhraseSettingsFile = dirname($phpPhraseSettingsFile)."/".basename($phpPhraseSettingsFile, ".php").".json";
if(file_exists($phpPhraseSettingsFile) && !file_exists($jsonPhraseSettingsFile))
{
>>>>>>> 3d939458... Changed phrase_settings.py to phrase-settings.json and added migration function for old php settings file.
include $phpPhraseSettingsFile;
$data = array();
@@ -16,4 +23,8 @@ if (file_exists($phpPhraseSettingsFile) && !file_exists($jsonPhraseSettingsFile)
$jsonFile = fopen($jsonPhraseSettingsFile, 'w');
fwrite($jsonFile, json_encode($data));
fclose($jsonFile);
<<<<<<< HEAD
}
=======
}
>>>>>>> 3d939458... Changed phrase_settings.py to phrase-settings.json and added migration function for old php settings file.