Add architecture reporting to get.php

This commit is contained in:
mkuba50 2017-09-30 23:04:30 +02:00
parent 77e97c8a04
commit 502b652436
2 changed files with 3 additions and 1 deletions

View File

@ -95,6 +95,7 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
return array('error' => 'EMPTY_FILELIST'); return array('error' => 'EMPTY_FILELIST');
} }
$updateArch = (isset($info['arch'])) ? $info['arch'] : 'UNKNOWN';
$updateName = (isset($info['title'])) ? $info['title'] : 'Unknown update: '.$updateId; $updateName = (isset($info['title'])) ? $info['title'] : 'Unknown update: '.$updateId;
$info = $info['files']; $info = $info['files'];
$out = preg_replace('/<FileLocation>|<\/FileLocation>/', '', $out[0]); $out = preg_replace('/<FileLocation>|<\/FileLocation>/', '', $out[0]);
@ -220,6 +221,7 @@ function uupGetFiles($updateId = 'c2a1d787-647b-486d-b264-f90f3782cdc6', $usePac
return array( return array(
'apiVersion' => uupApiVersion(), 'apiVersion' => uupApiVersion(),
'updateName' => $updateName, 'updateName' => $updateName,
'arch' => $updateArch,
'files' => $files, 'files' => $files,
); );
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '0.5.1-beta'; return '0.6.0-beta';
} }
function uupApiPrintBrand() { function uupApiPrintBrand() {