mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
firmware: extract subscription during migration #4881
We need it to better distinguish data during model validation against repository definitions.
This commit is contained in:
parent
4c65524322
commit
e79a8a1af0
@ -41,5 +41,12 @@ class M1_0_1 extends BaseModelMigration
|
||||
if (in_array((string)$model->flavour, ['latest', 'libressl'])) {
|
||||
$model->flavour = null;
|
||||
}
|
||||
if (!empty((string)$model->mirror)) {
|
||||
$is_business = stripos((string)$model->mirror, 'opnsense-update.deciso.com') > 1;
|
||||
if ($is_business) {
|
||||
$url = explode('/', (string)$model->mirror);
|
||||
$model->subscription = array_pop($url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user