forked from uup-dump/api
Remove 15063 specific fix and redundant code
The fix that was introduced for build 17025 is universal, does not add unneeded files, does not need to be explicitly enabled, and works fine for 15063, so there is no need to keep the old fix.
This commit is contained in:
parent
603b445b24
commit
b36195e224
79
get.php
79
get.php
@ -84,22 +84,6 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($info['build'])) {
|
|
||||||
$build = $info['build'];
|
|
||||||
|
|
||||||
if($build == 'UNKNOWN') {
|
|
||||||
$buildNumber = 9841;
|
|
||||||
} else {
|
|
||||||
$buildNumber = explode('.', $build);
|
|
||||||
$buildNumber = $buildNumber[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$uupFix = 0;
|
|
||||||
if(isset($info['needsFix'])) {
|
|
||||||
if($info['needsFix'] == true) $uupFix = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$rev = 1;
|
$rev = 1;
|
||||||
if(preg_match('/_rev\./', $updateId)) {
|
if(preg_match('/_rev\./', $updateId)) {
|
||||||
$rev = preg_replace('/.*_rev\./', '', $updateId);
|
$rev = preg_replace('/.*_rev\./', '', $updateId);
|
||||||
@ -172,6 +156,7 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
|||||||
$files[$newName] = $temp;
|
$files[$newName] = $temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unset($temp, $newName);
|
||||||
|
|
||||||
$psf = array_keys($files);
|
$psf = array_keys($files);
|
||||||
$psf = preg_grep('/\.psf$/i', $psf);
|
$psf = preg_grep('/\.psf$/i', $psf);
|
||||||
@ -184,43 +169,27 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
|||||||
unset($files[$val]);
|
unset($files[$val]);
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
unset($index, $name);
|
unset($index, $name, $psf);
|
||||||
|
|
||||||
if(!$uupFix) {
|
$temp = preg_grep('/'.$updateArch.'_.*|arm64.arm_.*/i', $removeFiles);
|
||||||
$temp = preg_grep('/'.$updateArch.'_.*|arm64.arm_.*/i', $removeFiles);
|
foreach($temp as $key => $val) {
|
||||||
|
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
||||||
foreach($temp as $key => $val) {
|
unset($removeFiles[$key]);
|
||||||
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
|
||||||
unset($removeFiles[$key]);
|
|
||||||
}
|
|
||||||
unset($temp);
|
|
||||||
|
|
||||||
foreach($removeFiles as $val) {
|
|
||||||
if(isset($files[$val.'.esd'])) {
|
|
||||||
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($files[$val.'.ESD'])) {
|
|
||||||
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
unset($removeFiles);
|
|
||||||
}
|
}
|
||||||
|
unset($temp);
|
||||||
|
|
||||||
|
foreach($removeFiles as $val) {
|
||||||
|
if(isset($files[$val.'.esd'])) {
|
||||||
|
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($files[$val.'.ESD'])) {
|
||||||
|
if(isset($files[$val.'.cab'])) unset($files[$val.'.cab']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($removeFiles);
|
||||||
|
|
||||||
$filesKeys = array_keys($files);
|
$filesKeys = array_keys($files);
|
||||||
|
|
||||||
if($uupFix) {
|
|
||||||
$removeFiles = preg_grep('/\.esd$/i', $filesKeys);
|
|
||||||
|
|
||||||
foreach($removeFiles as $val) {
|
|
||||||
$temp = preg_replace('/\.esd$/i', '', $val);
|
|
||||||
if(isset($files[$temp.'.cab'])) unset($files[$temp.'.cab']);
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($removeFiles, $temp);
|
|
||||||
$filesKeys = array_keys($files);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($desiredEdition == 'UPDATEONLY') {
|
if($desiredEdition == 'UPDATEONLY') {
|
||||||
$removeFiles = preg_grep('/Windows10\.0-KB.*-EXPRESS/i', $filesKeys);
|
$removeFiles = preg_grep('/Windows10\.0-KB.*-EXPRESS/i', $filesKeys);
|
||||||
|
|
||||||
@ -235,16 +204,18 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($usePack && $desiredEdition != 'UPDATEONLY') {
|
if($usePack && $desiredEdition != 'UPDATEONLY') {
|
||||||
$removeFiles = preg_grep('/RetailDemo-OfflineContent/i', $filesKeys);
|
$removeFiles = array();
|
||||||
$removeFiles = preg_grep('/Windows10\.0-KB.*-EXPRESS/i', $filesKeys);
|
$removeFiles[0] = preg_grep('/RetailDemo-OfflineContent/i', $filesKeys);
|
||||||
|
$removeFiles[1] = preg_grep('/Windows10\.0-KB.*-EXPRESS/i', $filesKeys);
|
||||||
|
|
||||||
foreach($removeFiles as $val) {
|
foreach($removeFiles as $val) {
|
||||||
if(isset($files[$val])) unset($files[$val]);
|
foreach($val as $temp) {
|
||||||
|
if(isset($files[$temp])) unset($files[$temp]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
unset($removeFiles, $temp, $val);
|
||||||
|
|
||||||
unset($removeFiles, $temp);
|
|
||||||
$filesKeys = array_keys($files);
|
$filesKeys = array_keys($files);
|
||||||
|
|
||||||
$filesTemp = array();
|
$filesTemp = array();
|
||||||
|
|
||||||
$temp = preg_grep('/.*'.$usePack.'-Package.*/i', $filesKeys);
|
$temp = preg_grep('/.*'.$usePack.'-Package.*/i', $filesKeys);
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function uupApiVersion() {
|
function uupApiVersion() {
|
||||||
return '1.5.0';
|
return '1.5.1';
|
||||||
}
|
}
|
||||||
|
|
||||||
function uupApiPrintBrand() {
|
function uupApiPrintBrand() {
|
||||||
|
Loading…
Reference in New Issue
Block a user