Merge pull request #538 from r4sas/fix-updater

fix updater to prevent redownloading update file
This commit is contained in:
Newcomer1989
2018-08-29 19:45:05 +02:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
enter_logfile($logpath,$timezone,4," Database-tables successfully backuped.",$norotate);
}
if(!is_file(substr(__DIR__,0,-4).'update/'.$newversion.'.zip')) {
if(!is_file(substr(__DIR__,0,-4).'update/ranksystem_'.$newversion.'.zip')) {
enter_logfile($logpath,$timezone,4," Downloading new update...",$norotate);
$newUpdate = file_get_contents('https://ts-n.net/downloads/ranksystem_'.$newversion.'.zip');
if(!is_dir(substr(__DIR__,0,-4).'update/')) {
@@ -132,4 +132,4 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
enter_logfile($logpath,$timezone,1," Files updated with at least one error. Please check the log!",$norotate);
// how to handle this.. Perhaps try again automatically in 30 minutes
}
}
}