public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 1/4] ruledb disclaimer: cleanup trailing whitespace
Date: Tue,  9 Jan 2024 14:59:01 +0100	[thread overview]
Message-ID: <20240109135906.66200-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240109135906.66200-1-d.csapak@proxmox.com>

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/PMG/RuleDB/Disclaimer.pm | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/PMG/RuleDB/Disclaimer.pm b/src/PMG/RuleDB/Disclaimer.pm
index c6afe54..5eadc6f 100644
--- a/src/PMG/RuleDB/Disclaimer.pm
+++ b/src/PMG/RuleDB/Disclaimer.pm
@@ -31,7 +31,7 @@ sub otype_text {
 }
 
 sub oisedit {
-    return 1;   
+    return 1;
 }
 
 sub final {
@@ -50,13 +50,13 @@ _EOD_
 
 sub new {
     my ($type, $value, $ogroup) = @_;
-    
+
     my $class = ref($type) || $type;
 
     $value //= $std_discl;
-    
+
     my $self = $class->SUPER::new($class->otype(), $ogroup);
-   
+
     $self->{value} = $value;
 
     return $self;
@@ -64,17 +64,17 @@ sub new {
 
 sub load_attr {
     my ($type, $ruledb, $id, $ogroup, $value) = @_;
-    
+
     my $class = ref($type) || $type;
 
     defined($value) || die "undefined object attribute: ERROR";
-  
+
     my $obj = $class->new(decode('UTF-8', $value), $ogroup);
 
     $obj->{id} = $id;
 
     $obj->{digest} = Digest::SHA::sha1_hex($id, $value, $ogroup);
-    
+
     return $obj;
 }
 
@@ -91,9 +91,9 @@ sub save {
 
     if (defined ($self->{id})) {
 	# update
-	
+
 	$ruledb->{dbh}->do(
-	    "UPDATE Object SET Value = ? WHERE ID = ?", 
+	    "UPDATE Object SET Value = ? WHERE ID = ?",
 	    undef, $value, $self->{id});
 
     } else {
@@ -104,14 +104,14 @@ sub save {
 	    "VALUES (?, ?, ?);");
 
 	$sth->execute($self->ogroup, $self->otype, $value);
-    
-	$self->{id} = PMG::Utils::lastid($ruledb->{dbh}, 'object_id_seq'); 
+
+	$self->{id} = PMG::Utils::lastid($ruledb->{dbh}, 'object_id_seq');
     }
-	
+
     return $self->{id};
 }
 
-sub add_data { 
+sub add_data {
     my ($self, $entity, $data) = @_;
 
     $entity->bodyhandle || return undef;
@@ -122,14 +122,14 @@ sub add_data {
     if (my $path = $entity->{PMX_decoded_path}) {
 	$fh = IO::File->new("<$path");
     } else {
-	$fh = $entity->open("r"); 
+	$fh = $entity->open("r");
     }
 
     return undef if !$fh;
 
     # in memory (we can't modify the file, because
     # a.) that would modify all entities (see ModGroup)
-    # b.) bad performance 
+    # b.) bad performance
     my $body = new MIME::Body::InCore || return undef;
 
     my $newfh = $body->open ("w") || return undef;
@@ -190,7 +190,7 @@ sub sign {
 }
 
 sub execute {
-    my ($self, $queue, $ruledb, $mod_group, $targets, 
+    my ($self, $queue, $ruledb, $mod_group, $targets,
 	$msginfo, $vars, $marks) = @_;
 
     my $rulename = encode('UTF-8', $vars->{RULE} // 'unknown');
@@ -212,7 +212,7 @@ sub execute {
 
 	$parser->parse($tmp);
 	$parser->eof;
-	    
+
 	$self->sign($entity, "$html\n", "$text\n", $queue->{logid}, $rulename);
 
 	return;
-- 
2.30.2





  reply	other threads:[~2024-01-09 13:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 13:59 [pmg-devel] [PATCH pmg-api/gui] ruledb disclaimer improvements Dominik Csapak
2024-01-09 13:59 ` Dominik Csapak [this message]
2024-01-12 15:47   ` [pmg-devel] applied: [PATCH pmg-api 1/4] ruledb disclaimer: cleanup trailing whitespace Thomas Lamprecht
2024-01-09 13:59 ` [pmg-devel] [PATCH pmg-api 2/4] ruledb disclaimer: if/elsif code cleanup Dominik Csapak
2024-01-12 15:47   ` [pmg-devel] applied: " Thomas Lamprecht
2024-01-09 13:59 ` [pmg-devel] [PATCH pmg-api 3/4] fix #2606: ruledb disclaimer: add ability to add on top Dominik Csapak
2024-01-09 13:59 ` [pmg-devel] [PATCH pmg-api 4/4] fix #2430: ruledb disclaimer: make separator configurable Dominik Csapak
2024-01-09 13:59 ` [pmg-devel] [PATCH pmg-gui 1/2] disclaimer edit: add 'top' checkbox Dominik Csapak
2024-01-12 16:00   ` Thomas Lamprecht
2024-01-09 13:59 ` [pmg-devel] [PATCH pmg-gui 2/2] disclaimer edit: add 'add-separator' checkbox Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109135906.66200-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal