From d1197f55cfacd534b5f5d01b839fc9b8fba2e3b1 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Thu, 23 Jan 2025 07:12:01 +0000 Subject: [PATCH] Update letsencrypt dealing with pointer to hash of params --- .../lib/SrvMngr/Controller/Letsencrypt-Custom.pm | 12 ++++++------ .../smanager/lib/SrvMngr/Controller/Letsencrypt.pm | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt-Custom.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt-Custom.pm index 8d5b663..ca68016 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt-Custom.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt-Custom.pm @@ -354,7 +354,7 @@ sub get_selected_LIST { my $selected = shift; #Parameter is name of selected row. my $is_new_record = shift; #Indicates new record required (defaults) my %ret = {}; - return $ret; + return %ret; } ## end sub get_selected_LIST sub get_selected_PARAMS { @@ -362,7 +362,7 @@ sub get_selected_PARAMS { my $selected = shift; #Parameter is name of selected row. my $is_new_record = shift; #Indicates new record required (defaults) my %ret = {}; - return $ret; + return %ret; } ## end sub get_selected_PARAMS sub get_selected_CHECKALLDOMAINS { @@ -370,7 +370,7 @@ sub get_selected_CHECKALLDOMAINS { my $selected = shift; #Parameter is name of selected row. my $is_new_record = shift; #Indicates new record required (defaults) my %ret = {}; - return $ret; + return %ret; } ## end sub get_selected_CHECKALLDOMAINS sub get_selected_CHECKALLENABLEDDOMAINS { @@ -378,7 +378,7 @@ sub get_selected_CHECKALLENABLEDDOMAINS { my $selected = shift; #Parameter is name of selected row. my $is_new_record = shift; #Indicates new record required (defaults) my %ret = {}; - return $ret; + return %ret; } ## end sub get_selected_CHECKALLENABLEDDOMAINS sub get_selected_CHECKONEDOMAIN { @@ -386,7 +386,7 @@ sub get_selected_CHECKONEDOMAIN { my $selected = shift; #Parameter is name of selected row. my $is_new_record = shift; #Indicates new record required (defaults) my %ret = {}; - return $ret; + return %ret; } ## end sub get_selected_CHECKONEDOMAIN #after sucessful modify or create or whatever and submit then perfom (if the params validate) @@ -563,4 +563,4 @@ sub update_enabled_domains { my $output = `/etc/e-smith/events/actions/letsencrypt-setdomains "" "" enabled `; return $output || "-empty-"; } ## end sub update_enabled_domains -1; +1; \ No newline at end of file diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt.pm index 0d3df42..6e700e7 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Letsencrypt.pm @@ -305,10 +305,10 @@ sub do_display { my $modul = ""; # Accessing all parameters - my %params = $c->req->params->to_hash; + my $params = $c->req->params->to_hash; # Get number of parameters - my $num_params = keys %params; + my $num_params = scalar keys %$params; #Tag as Post or Get (ie. create new entry or edit existing one my $is_new_record = ($c->req->method() eq 'POST'); @@ -445,4 +445,4 @@ sub do_display { ); $c->render(template => "letsencrypt"); } ## end sub do_display -1; +1; \ No newline at end of file