Add config reader helper

This commit is contained in:
eraseyourknees 2022-09-16 00:24:18 +02:00
parent 79730cdd24
commit 1cc48ae9d8

View File

@ -183,3 +183,12 @@ function uupApiWriteJson($path, $data) {
function uupApiPacksExist($updateId) { function uupApiPacksExist($updateId) {
return file_exists('packs/'.$updateId.'.json.gz'); return file_exists('packs/'.$updateId.'.json.gz');
} }
function uupApiConfigIsTrue($config) {
$data = uupDumpApiGetConfig();
if(!isset($data[$config]))
return false;
return $data[$config] == true;
}