Merge pull request #538 from r4sas/fix-updater
fix updater to prevent redownloading update file
This commit is contained in:
@@ -40,7 +40,7 @@ function update_rs($mysqlcon,$lang,$dbname,$logpath,$timezone,$newversion,$phpco
|
|||||||
enter_logfile($logpath,$timezone,4," Database-tables successfully backuped.",$norotate);
|
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);
|
enter_logfile($logpath,$timezone,4," Downloading new update...",$norotate);
|
||||||
$newUpdate = file_get_contents('https://ts-n.net/downloads/ranksystem_'.$newversion.'.zip');
|
$newUpdate = file_get_contents('https://ts-n.net/downloads/ranksystem_'.$newversion.'.zip');
|
||||||
if(!is_dir(substr(__DIR__,0,-4).'update/')) {
|
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);
|
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
|
// how to handle this.. Perhaps try again automatically in 30 minutes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user