Code Duplication    Length = 8-8 lines in 2 locations

install/upgrade_run_2.1.27.php 1 location

@@ 676-683 (lines=8) @@
673
* Introduce new CONFIG file
674
*/
675
$tp_config_file = "../includes/config/tp.config.php";
676
if (file_exists($tp_config_file)) {
677
    if (!copy($tp_config_file, $tp_config_file.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) {
678
        echo '[{"error" : "includes/config/tp.config.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$post_index.'", "multiple" : "'.$post_multiple.'"}]';
679
        return false;
680
    } else {
681
        unlink($tp_config_file);
682
    }
683
}
684
$file_handler = fopen($tp_config_file, 'w');
685
$config_text = "";
686
$any_settings = false;

install/upgrade_run_final.php 1 location

@@ 192-199 (lines=8) @@
189
* UPDATE CONFIG file
190
*/
191
$tp_config_file = "../includes/config/tp.config.php";
192
if (file_exists($tp_config_file)) {
193
    if (!copy($tp_config_file, $tp_config_file.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) {
194
        echo '[{"error" : "includes/config/tp.config.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$post_index.'", "multiple" : "'.$post_multiple.'"}]';
195
        return false;
196
    } else {
197
        unlink($tp_config_file);
198
    }
199
}
200
$file_handler = fopen($tp_config_file, 'w');
201
$config_text = "";
202
$any_settings = false;