forked from uup-dump/api
Add architecture reporting to get.php
This commit is contained in:
parent
77e97c8a04
commit
502b652436
2
get.php
2
get.php
@ -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,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user