forked from uup-dump/api
Change handling of packs
The handling of packs has been changed to use different files for builds. This will allow easier implementation of changed packs in future.
This commit is contained in:
@ -16,9 +16,24 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/shared/main.php';
|
||||
require_once dirname(__FILE__).'/shared/packs.php';
|
||||
|
||||
function uupListEditions($lang = 'en-us') {
|
||||
require dirname(__FILE__).'/shared/packs.php';
|
||||
function uupListEditions($lang = 'en-us', $updateId = 0) {
|
||||
if($updateId) {
|
||||
$info = uupUpdateInfo($updateId, 'build');
|
||||
}
|
||||
|
||||
if(isset($info['info'])) {
|
||||
$build = explode('.', $info['info']);
|
||||
$build = $build[0];
|
||||
} else {
|
||||
$build = 9841;
|
||||
}
|
||||
|
||||
$packs = uupGetPacks($build);
|
||||
$packsForLangs = $packs['packsForLangs'];
|
||||
$fancyEditionNames = $packs['fancyEditionNames'];
|
||||
$packs = $packs['packs'];
|
||||
|
||||
if($lang) {
|
||||
$lang = strtolower($lang);
|
||||
|
Reference in New Issue
Block a user