Make sure all plain string constants are in single quotes

This commit is contained in:
2025-06-15 06:07:49 +01:00
parent 40e83a4bee
commit ae2ba92597
2 changed files with 25 additions and 25 deletions

View File

@@ -30,11 +30,11 @@ my $ddb;
my $c = shift;
my $$${prefix}_data = shift; #Data hash as parameter
# Validation for each field
my $ret = "";
my $ret = '';
<tal:block tal:repeat="field fields[panel]">
if (! TRUE) #validate $c->param('${field}')
{$ret .= 'Validation for ${field} failed';} </tal:block>
if ($ret eq "") {$ret = 'ok';}
if ($ret eq '') {$ret = 'ok';}
return $ret;
}
</tal:block>
@@ -114,14 +114,14 @@ sub get_${tablecontrol[0]} {
sub perform_${panel} {
my $c = shift;
my $$${prefix}_data = shift; #Data hash as parameter
my $ret = "";
my $ret = '';
my $db = $cdb; #maybe one of the others
my $dbkey = 'ChangeThis';
# To make it write to DB as comment, delete this (regex) string in each if statement "TRUE\) \#copy or perform with value: .* e.g."
<tal:block tal:repeat="field fields[panel]">
if (! TRUE) #copy or perform with value: ${field} e.g. $db->set_prop($dbkey,'${field}',$c->param('${field}'),type=>'service'))
{$ret .= 'Perform/save failed for ${field}';}</tal:block>
if ($ret eq "") {$ret = 'ok';}
if ($ret eq '') {$ret = 'ok';}
return $ret;
}
</tal:block>
@@ -132,4 +132,4 @@ sub create_link{
my $link = "$route?trt=$panel&Selected=$index";
return $link;
}
1;
1;