commit
aeb86d4333
@ -283,7 +283,8 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
|||||||
return array('error' => 'BROKEN_UPDATE');
|
return array('error' => 'BROKEN_UPDATE');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match('/Corpnet Required/i', $updateTitle)) {
|
$isCorpnet = preg_match('/Corpnet Required/i', $updateTitle);
|
||||||
|
if($isCorpnet && !uupApiConfigIsTrue('allow_corpnet')) {
|
||||||
consoleLogger('Skipping corpnet only update...');
|
consoleLogger('Skipping corpnet only update...');
|
||||||
return array('error' => 'CORPNET_ONLY_UPDATE');
|
return array('error' => 'CORPNET_ONLY_UPDATE');
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function uupApiVersion() {
|
function uupApiVersion() {
|
||||||
return '1.38.0';
|
return '1.39.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/auths.php';
|
require_once dirname(__FILE__).'/auths.php';
|
||||||
|
@ -184,6 +184,10 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
|||||||
'WuClientVer='.$build,
|
'WuClientVer='.$build,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($ring == 'MSIT' && uupApiConfigIsTrue('allow_corpnet')) {
|
||||||
|
$attrib[] = 'DUInternal=1';
|
||||||
|
}
|
||||||
|
|
||||||
return htmlentities('E:'.implode('&', $attrib));
|
return htmlentities('E:'.implode('&', $attrib));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,6 +406,9 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
|
|||||||
$type
|
$type
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$syncCurrent = uupApiConfigIsTrue('fetch_sync_current_only');
|
||||||
|
$syncCurrentStr = $syncCurrent ? 'true' : 'false';
|
||||||
|
|
||||||
return <<<XML
|
return <<<XML
|
||||||
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
|
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
|
||||||
<s:Header>
|
<s:Header>
|
||||||
@ -523,7 +530,7 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
|
|||||||
</ExtendedUpdateInfoParameters>
|
</ExtendedUpdateInfoParameters>
|
||||||
<ClientPreferredLanguages/>
|
<ClientPreferredLanguages/>
|
||||||
<ProductsParameters>
|
<ProductsParameters>
|
||||||
<SyncCurrentVersionOnly>false</SyncCurrentVersionOnly>
|
<SyncCurrentVersionOnly>$syncCurrentStr</SyncCurrentVersionOnly>
|
||||||
<DeviceAttributes>$deviceAttributes</DeviceAttributes>
|
<DeviceAttributes>$deviceAttributes</DeviceAttributes>
|
||||||
<CallerAttributes>$callerAttrib</CallerAttributes>
|
<CallerAttributes>$callerAttrib</CallerAttributes>
|
||||||
<Products>$products</Products>
|
<Products>$products</Products>
|
||||||
|
@ -179,3 +179,16 @@ function uupApiReadJson($path) {
|
|||||||
function uupApiWriteJson($path, $data) {
|
function uupApiWriteJson($path, $data) {
|
||||||
return file_put_contents($path, json_encode($data)."\n");
|
return file_put_contents($path, json_encode($data)."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uupApiPacksExist($updateId) {
|
||||||
|
return file_exists('packs/'.$updateId.'.json.gz');
|
||||||
|
}
|
||||||
|
|
||||||
|
function uupApiConfigIsTrue($config) {
|
||||||
|
$data = uupDumpApiGetConfig();
|
||||||
|
|
||||||
|
if(!isset($data[$config]))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return $data[$config] == true;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user