Compare commits
3 Commits
2231d65edb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 22e344bdf2 | |||
| 0774988365 | |||
| e7fddd4e43 |
21
fetchupd.php
21
fetchupd.php
@@ -34,20 +34,13 @@ function uupApiPrivateParseFlags($str) {
|
||||
}
|
||||
|
||||
function uupApiPrivateGetLatestBuild() {
|
||||
$builds = array('22000.1');
|
||||
|
||||
$ids = uupListIds();
|
||||
if(isset($ids['error'])) {
|
||||
$ids['builds'] = array();
|
||||
|
||||
if(!isset($ids['builds']) || empty($ids['builds'])) {
|
||||
return '26100.1';
|
||||
}
|
||||
|
||||
if(empty($ids['builds'])) {
|
||||
$build = $builds[0];
|
||||
} else {
|
||||
$build = $ids['builds'][0]['build'];
|
||||
}
|
||||
|
||||
return $build;
|
||||
return $ids['builds'][0]['build'];
|
||||
}
|
||||
|
||||
function uupApiPrivateGetLatestPatch($build) {
|
||||
@@ -101,7 +94,7 @@ function uupApiPrivateNormalizeFetchParams($params) {
|
||||
'arch' => 'amd64',
|
||||
'ring' => 'WIF',
|
||||
'flight' => 'Active',
|
||||
'branch' => 'ge_release',
|
||||
'branch' => 'auto',
|
||||
'build' => 'latest',
|
||||
'minor' => 0,
|
||||
'sku' => 48,
|
||||
@@ -370,7 +363,7 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
||||
$updateTitle = str_replace('Windows 11', 'Windows Server', $updateTitle);
|
||||
}
|
||||
|
||||
if(preg_match('/Windows 1\d|Server|Azure Stack HCI/i', $updateTitle) !== 1) {
|
||||
if(preg_match('/Windows 1\d|Server|Azure Stack HCI|Windows CPC OS/i', $updateTitle) !== 1) {
|
||||
$osName = $foundType != 'server' ? 'Windows 11' : 'Microsoft server operating system';
|
||||
$updateTitle = str_replace('Update', "Update for $osName", $updateTitle);
|
||||
}
|
||||
@@ -384,7 +377,7 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
||||
if($foundType == 'hololens' || $foundType == 'wcosdevice0')
|
||||
$updateTitle = $updateTitle.' - '.$type;
|
||||
|
||||
if(!preg_match("/$foundBuild/i", $updateTitle))
|
||||
if(!str_contains($updateTitle, $foundBuild))
|
||||
$updateTitle = $updateTitle.' ('.$foundBuild.')';
|
||||
|
||||
preg_match('/UpdateID=".*?"/', $updateInfo, $updateId);
|
||||
|
||||
Reference in New Issue
Block a user