From bb1792bfe39880226f4d05c769cfac792222219a Mon Sep 17 00:00:00 2001 From: awuctl <61098069+awuctl@users.noreply.github.com> Date: Wed, 22 Jul 2020 07:57:05 +0200 Subject: [PATCH] Add updateInfo to return value of uupListLangs "Quality of life" --- listlangs.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/listlangs.php b/listlangs.php index 737fd8b..5bde8c1 100644 --- a/listlangs.php +++ b/listlangs.php @@ -57,10 +57,19 @@ function uupListLangs($updateId = 0) { $langList[] = $key; $langListFancy[$key] = $fancyName; } - - return array( - 'apiVersion' => uupApiVersion(), - 'langList' => $langList, - 'langFancyNames' => $langListFancy, - ); + + if(isset($info)) { + return array( + 'apiVersion' => uupApiVersion(), + 'langList' => $langList, + 'langFancyNames' => $langListFancy, + 'updateInfo' => $info + ); + } else { + return array( + 'apiVersion' => uupApiVersion(), + 'langList' => $langList, + 'langFancyNames' => $langListFancy + ); + } }