urlencode branch
parent
e8ea8dfb93
commit
8f4c5d2d30
|
@ -128,7 +128,14 @@ function install()
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
} else {
|
} else {
|
||||||
return output('Jump<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
return output('Jump
|
||||||
|
<script>
|
||||||
|
var expd = new Date();
|
||||||
|
expd.setTime(expd.getTime()+(2*60*60*1000));
|
||||||
|
var expires = "expires="+expd.toGMTString();
|
||||||
|
document.cookie=\'language=; path=/; \'+expires;
|
||||||
|
</script>
|
||||||
|
<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,7 +213,10 @@ language:<br>';
|
||||||
<script>
|
<script>
|
||||||
function changelanguage(str)
|
function changelanguage(str)
|
||||||
{
|
{
|
||||||
document.cookie=\'language=\'+str+\'; path=/\';
|
var expd = new Date();
|
||||||
|
expd.setTime(expd.getTime()+(2*60*60*1000));
|
||||||
|
var expires = "expires="+expd.toGMTString();
|
||||||
|
document.cookie=\'language=\'+str+\'; path=/; \'+expires;
|
||||||
location.href = location.href;
|
location.href = location.href;
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
@ -263,7 +273,7 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch =
|
||||||
$projectPath = splitlast(__DIR__, '/')[0];
|
$projectPath = splitlast(__DIR__, '/')[0];
|
||||||
|
|
||||||
// 从github下载对应tar.gz,并解压
|
// 从github下载对应tar.gz,并解压
|
||||||
$url = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . $branch . '/';
|
$url = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . urlencode($branch) . '/';
|
||||||
$tarfile = $projectPath.'/github.tar.gz';
|
$tarfile = $projectPath.'/github.tar.gz';
|
||||||
$githubfile = file_get_contents($url);
|
$githubfile = file_get_contents($url);
|
||||||
if (!$githubfile) return 0;
|
if (!$githubfile) return 0;
|
||||||
|
|
Loading…
Reference in New Issue