Commit 27f3a1be authored by Franco Fichtner's avatar Franco Fichtner

firmware: prepare for our new "-devel" plugin suffix

parent 012d0b90
<?php
/**
* Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
* Copyright (c) 2015-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (c) 2015-2016 Deciso B.V.
* All rights reserved.
*
......@@ -519,8 +519,24 @@ class FirmwareController extends ApiControllerBase
/* figure out local and remote plugins */
$plugin = explode('-', $translated['name']);
if (count($plugin)) {
if ($plugin[0] == 'os' || ($type == 'local' && $plugin[0] == 'ospriv') ||
($devel && $type == 'remote' && $plugin[0] == 'ospriv')) {
$visible = 0;
/* "os" is our common prefix, "devel" the development suffix */
if ($plugin[0] == 'os') {
if ($type = 'local') {
$visible = 1;
} elseif ($type = 'remote') {
if (count($plugin) < 3 || end($plugin) != 'devel') {
$visible = 1;
} elseif ($devel) {
$visible = 1;
}
}
}
/* "ospriv" is our historic development prefix */
if ($plugin[0] == 'ospriv' && ($type == 'local' || ($devel && $type == 'remote'))) {
$visible = 1;
}
if ($visible) {
$plugins[$translated['name']] = $translated;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment