accidently merged this back in from local copy

pull/70/head
Remco van Zuijlen 8 years ago committed by GitHub
parent 32803b08d7
commit 8a6380f334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,41 +60,6 @@ function CreateCode ($laenge) {
return $out; return $out;
} }
function UpdateHashFile($HashFile, $newLastSync, $newHash) {
if (version_compare(phpversion(), "5.6", ">=")) {
$Ressource = @fopen($HashFile, "c");
if ($Ressource) {
if (flock($Ressource, LOCK_EX)) {
@fwrite($Ressource, "<?php\n");
@fwrite($Ressource, "\n".'$LastSync = '.$newLastSync.';');
@fwrite($Ressource, "\n".'$Hash = "'.$newHash.'";');
@fwrite($Ressource, "\n\n".'?>');
@fflush($Ressource);
@ftruncate($Ressource, ftell($Ressource));
@flock($Ressource, LOCK_UN);
}
@fclose($Ressource);
@chmod($HashFile, 0644);
return true;
}
}
else {
$Ressource = @fopen($HashFile, "w");
if ($Ressource) {
@fwrite($Ressource, "<?php\n");
@fwrite($Ressource, "\n".'$LastSync = 0;');
@fwrite($Ressource, "\n".'$Hash = "'.$newHash.'";');
@fwrite($Ressource, "\n\n".'?>');
@fclose($Ressource);
@chmod($HashFile, 0644);
$CallHomeNow = true;
}
}
return false;
}
function VNStatLocalize($str) { function VNStatLocalize($str) {
global $L; global $L;
if (isset($L[$str])) { if (isset($L[$str])) {

Loading…
Cancel
Save

Powered by TurnKey Linux.