Compare commits
No commits in common. "master" and "master" have entirely different histories.
13
fetchupd.php
13
fetchupd.php
@ -50,12 +50,8 @@ function uupApiPrivateGetLatestBuild() {
|
||||
return $build;
|
||||
}
|
||||
|
||||
function uupApiPrivateIsAcceptableBranch($branch) {
|
||||
if(!uupApiConfigIsTrue('production_mode')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$branches = [
|
||||
function uupApiPrivateGetAcceptableBranches() {
|
||||
return [
|
||||
'auto',
|
||||
'rs2_release',
|
||||
'rs3_release',
|
||||
@ -70,11 +66,8 @@ function uupApiPrivateIsAcceptableBranch($branch) {
|
||||
'ni_release',
|
||||
'zn_release',
|
||||
'ge_release',
|
||||
'ge_prerelease',
|
||||
'rs_prerelease',
|
||||
];
|
||||
|
||||
return in_array($branch, $branches);
|
||||
}
|
||||
|
||||
function uupApiPrivateNormalizeFetchParams($params) {
|
||||
@ -180,7 +173,7 @@ function uupFetchUpd2($params, $cacheRequests = 0) {
|
||||
return array('error' => 'ILLEGAL_MINOR');
|
||||
}
|
||||
|
||||
if(!uupApiPrivateIsAcceptableBranch($branch))
|
||||
if(!in_array($branch, uupApiPrivateGetAcceptableBranches()))
|
||||
$branch = 'auto';
|
||||
|
||||
if($ring == 'DEV') $ring = 'WIF';
|
||||
|
@ -35,10 +35,6 @@ class UupDumpCache {
|
||||
}
|
||||
|
||||
public function get() {
|
||||
if(!uupApiConfigIsTrue('production_mode')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cacheFile = $this->cacheFile;
|
||||
|
||||
if(!file_exists($cacheFile)) {
|
||||
@ -62,10 +58,6 @@ class UupDumpCache {
|
||||
}
|
||||
|
||||
public function put($content, $validity) {
|
||||
if(!uupApiConfigIsTrue('production_mode')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cacheFile = $this->cacheFile;
|
||||
$expires = $validity ? time() + $validity : false;
|
||||
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function uupApiVersion() {
|
||||
return '1.49.0';
|
||||
return '1.47.4';
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/auths.php';
|
||||
|
@ -298,7 +298,6 @@ function branchFromBuild($build) {
|
||||
|
||||
case 22621:
|
||||
case 22631:
|
||||
case 22635:
|
||||
$branch = 'ni_release';
|
||||
break;
|
||||
|
||||
@ -307,8 +306,6 @@ function branchFromBuild($build) {
|
||||
break;
|
||||
|
||||
case 26100:
|
||||
case 26120:
|
||||
case 26200:
|
||||
$branch = 'ge_release';
|
||||
break;
|
||||
|
||||
|
@ -64,12 +64,8 @@ function sendWuPostRequestInternal($url, $postData, $saveCookie = true) {
|
||||
curl_setopt($req, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($req, CURLOPT_ENCODING, '');
|
||||
curl_setopt($req, CURLOPT_POSTFIELDS, $postData);
|
||||
|
||||
if(uupApiConfigIsTrue('production_mode')) {
|
||||
curl_setopt($req, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($req, CURLOPT_TIMEOUT, 15);
|
||||
}
|
||||
|
||||
curl_setopt($req, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($req, CURLOPT_TIMEOUT, 15);
|
||||
curl_setopt($req, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($req, CURLOPT_HTTPHEADER, array(
|
||||
'User-Agent: Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.50',
|
||||
|
Loading…
x
Reference in New Issue
Block a user