plugins: style sweep
This commit is contained in:
parent
f3ed2695fe
commit
85a27147c4
|
@ -32,8 +32,8 @@ function ddclient_services()
|
|||
$services = [];
|
||||
$cnf = \OPNsense\Core\Config::getInstance()->object();
|
||||
$is_enabled = false;
|
||||
if ($cnf->OPNsense && $cnf->OPNsense->DynDNS && $cnf->OPNsense->DynDNS->general){
|
||||
$is_enabled = $cnf->OPNsense->DynDNS->general->enabled == '1';
|
||||
if ($cnf->OPNsense && $cnf->OPNsense->DynDNS && $cnf->OPNsense->DynDNS->general) {
|
||||
$is_enabled = $cnf->OPNsense->DynDNS->general->enabled == '1';
|
||||
}
|
||||
|
||||
if ($is_enabled) {
|
||||
|
|
|
@ -32,7 +32,7 @@ function wazuhagent_services()
|
|||
$services = [];
|
||||
$cnf = \OPNsense\Core\Config::getInstance()->object();
|
||||
$is_enabled = false;
|
||||
if ($cnf->OPNsense && $cnf->OPNsense->WazuhAgent && $cnf->OPNsense->WazuhAgent->general){
|
||||
if ($cnf->OPNsense && $cnf->OPNsense->WazuhAgent && $cnf->OPNsense->WazuhAgent->general) {
|
||||
$is_enabled = $cnf->OPNsense->WazuhAgent->general->enabled == '1';
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Plugin Changelog
|
|||
* Increased timeout of message area in reverse_proxy.volt and general.volt to 15 seconds.
|
||||
* When pressing Apply, the form is saved automatically before the reconfigure action.
|
||||
* Cleaned up Caddy.xml model to satisfy make lint.
|
||||
* When selecting an interface in Dynamic DNS, at most one IPv6 GUA and IPv4 non-RFC1918 address will be extracted. Fixes all IP addresses being read.
|
||||
* When selecting an interface in Dynamic DNS, at most one IPv6 GUA and IPv4 non-RFC1918 address will be extracted. Fixes all IP addresses being read.
|
||||
|
||||
1.5.1
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@ function caddy_services()
|
|||
|
||||
$services = array();
|
||||
|
||||
if (isset($config['Pischem']['caddy']['general']['enabled']) &&
|
||||
$config['Pischem']['caddy']['general']['enabled'] == 1) {
|
||||
if (
|
||||
isset($config['Pischem']['caddy']['general']['enabled']) &&
|
||||
$config['Pischem']['caddy']['general']['enabled'] == 1
|
||||
) {
|
||||
$services[] = array(
|
||||
'description' => gettext('Caddy Web Server'),
|
||||
'configd' => array(
|
||||
|
|
|
@ -33,8 +33,10 @@ namespace OPNsense\Caddy;
|
|||
|
||||
use OPNsense\Base\IndexController;
|
||||
|
||||
class ReverseProxyController extends IndexController {
|
||||
public function indexAction() {
|
||||
class ReverseProxyController extends IndexController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->pick('OPNsense/Caddy/reverse_proxy');
|
||||
$this->view->formDialogReverseProxy = $this->getForm("dialogReverseProxy");
|
||||
$this->view->formDialogSubdomain = $this->getForm("dialogSubdomain");
|
||||
|
|
|
@ -40,16 +40,13 @@ class M1_1_3 extends BaseModelMigration
|
|||
|
||||
// Ensure there are reverse proxy configurations to process
|
||||
if (!empty($config->Pischem->caddy->reverseproxy)) {
|
||||
|
||||
// Loop through each reverse proxy configuration in the stored configuration config.xml
|
||||
foreach ($config->Pischem->caddy->reverseproxy->children() as $configNode) {
|
||||
|
||||
// Extract the UUID attribute to identify the configuration item
|
||||
$uuid = (string)$configNode->attributes()->uuid;
|
||||
|
||||
// Check if the current configuration item has a 'Description' to migrate
|
||||
if (!empty($configNode->Description)) {
|
||||
|
||||
// Store the value of 'Description' for migration
|
||||
$descriptionValue = (string)$configNode->Description;
|
||||
|
||||
|
|
|
@ -37,7 +37,8 @@ use OPNsense\Core\Config;
|
|||
$configObj = Config::getInstance()->object();
|
||||
$temp_dir = '/usr/local/etc/caddy/certificates/temp/';
|
||||
|
||||
function extract_and_save_certificates($configObj, $temp_dir) {
|
||||
function extract_and_save_certificates($configObj, $temp_dir)
|
||||
{
|
||||
// Traverse through certificates
|
||||
foreach ($configObj->cert as $cert) {
|
||||
$cert_refid = (string)$cert->refid;
|
||||
|
|
Loading…
Reference in New Issue