mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
firmware: allow manual development override on business subscription
In case the flavour is a directory location on the mirror containing a slash allow for manual flavour and type selection.
This commit is contained in:
parent
1eb4520b65
commit
7ddb90cb79
@ -1028,11 +1028,14 @@ class FirmwareController extends ApiControllerBase
|
||||
if (!preg_match('/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}/i', $selSubscription)) {
|
||||
$invalid_msgs[] = gettext('A valid subscription is required for this firmware mirror.');
|
||||
}
|
||||
if (!in_array($selectedFlavour, $validOptions['flavours_has_subscription'])) {
|
||||
$invalid_msgs[] = sprintf(gettext('Subscription requires the following flavour: %s'), $validOptions['flavours'][$validOptions['flavours_has_subscription'][0]]);
|
||||
}
|
||||
if (!in_array($selectedType, $validOptions['families_has_subscription'])) {
|
||||
$invalid_msgs[] = sprintf(gettext('Subscription requires the following type: %s'), $validOptions['families'][$validOptions['families_has_subscription'][0]]);
|
||||
if (!preg_match('/\//', $selectedFlavour)) {
|
||||
/* error when flat flavour is used, but not when directory location was selected */
|
||||
if (!in_array($selectedFlavour, $validOptions['flavours_has_subscription'])) {
|
||||
$invalid_msgs[] = sprintf(gettext('Subscription requires the following flavour: %s'), $validOptions['flavours'][$validOptions['flavours_has_subscription'][0]]);
|
||||
}
|
||||
if (!in_array($selectedType, $validOptions['families_has_subscription'])) {
|
||||
$invalid_msgs[] = sprintf(gettext('Subscription requires the following type: %s'), $validOptions['families'][$validOptions['families_has_subscription'][0]]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($selSubscription)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user