]> git.proxmox.com Git - pmg-api.git/commitdiff
remove dead code
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 2 Mar 2017 11:25:16 +0000 (12:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 2 Mar 2017 11:25:16 +0000 (12:25 +0100)
16 files changed:
PMG/DBTools.pm
PMG/RuleDB.pm
PMG/RuleDB/Accept.pm
PMG/RuleDB/Attach.pm
PMG/RuleDB/BCC.pm
PMG/RuleDB/Counter.pm
PMG/RuleDB/Disclaimer.pm
PMG/RuleDB/Domain.pm
PMG/RuleDB/MatchFilename.pm
PMG/RuleDB/Notify.pm
PMG/RuleDB/Object.pm
PMG/RuleDB/Quarantine.pm
PMG/RuleDB/Remove.pm
PMG/RuleDB/ReportSpam.pm
PMG/RuleDB/Spam.pm
PMG/RuleDB/TimeFrame.pm

index c2b5d562542e57fdcbc74292fc705c98086dfa44..9637f3a361f50ca6a2f21c7e72ed158163ff481e 100644 (file)
@@ -429,7 +429,7 @@ sub cond_create_action_quarantine {
            my $obj = PMG::RuleDB::Quarantine->new ();
            my $txt = decode_entities(PMG::RuleDB::Quarantine->otype_text);
            my $quarantine = $ruledb->create_group_with_obj
-               ($obj, $txt, PMG::RuleDB::Quarantine->oinfo);
+               ($obj, $txt, 'Move to quarantine.');
        }
     };
 }
index d3581d750b2516a3519f079a05edc4e9e582e382..ce7ac75be4329ee95c39dcbf14df7d6cfaf8acc3 100644 (file)
@@ -138,42 +138,6 @@ sub save_group {
     return undef;
 }
 
-sub new_action {
-    my ($self, $obj) = @_;
-
-    my $og;
-
-    defined($obj) || die "proxmox: undefined object";
-
-    eval {
-
-       $self->{dbh}->begin_work;
-
-        $self->{dbh}->do("INSERT INTO Objectgroup " .
-                         "(Name, Info, Class) " .
-                         "VALUES (?, ?, ?)", undef,
-                         decode_entities($obj->otype_text()),
-                         $obj->oinfo(),
-                         $obj->oclass());
-
-       my $lid = PMG::Utils::lastid($self->{dbh}, 'objectgroup_id_seq');
-
-       $og = PMG::RuleDB::Group->new();
-       $og->{id} = $lid;
-
-       $obj->{ogroup} = $lid;
-       $obj->save($self, 1);
-
-        $self->{dbh}->commit;
-    };
-    if (my $err = $@) {
-       $self->{dbh}->rollback;
-       die $err;
-    }
-
-    return $og;
-}
-
 sub delete_group {
     my ($self, $groupid) = @_;
 
index 21942c0fe8a3803af50489650b9570641e19abed..aace3d3bd59877d269a951dc4beaac33ee60f320 100644 (file)
@@ -25,14 +25,6 @@ sub otype_text {
     return 'Accept';
 }
 
-sub oicon {
-    return 'accept.gif';
-}
-
-sub oinfo {
-    return 'Accept mail for delivery.';
-}
-
 sub oisedit {
     return 0;   
 }
index d91b9a155f3c02c7fb856eb31c6e955dd2a035c9..78b274971050fe9649fbada791be3749d9af7bf5 100644 (file)
@@ -24,18 +24,6 @@ sub otype_text {
     return 'Attach';
 }
 
-sub oicon {
-    return 'attach.gif';
-}
-
-sub oconfigsite {
-    return '';
-}
-
-sub oinfo {
-    return 'Attach Data to Mail';
-}
-
 sub oisedit {
     return 0;
 }
index e9b4b3dcc693a3034c4aba82d646cda1b8666ecd..c2dce8a724c58f611ca92a3a8a156d32c68ce4e7 100644 (file)
@@ -28,10 +28,6 @@ sub oicon {
     return 'bcc.gif';
 }
 
-sub oinfo {
-    return 'Blind carbon copy.';
-}
-
 sub oisedit {
     return 1;
 }
index 6caa25f124aa7ea342ba654c7fce75db4990a954..67474c1ebe54a3a384eb7d29f77a4fa0962b0803 100644 (file)
@@ -24,18 +24,6 @@ sub otype_text {
     return 'Counter';
 }
 
-sub oicon {
-    return 'counter.gif';
-}
-
-sub oconfigsite {
-    return 'item_counter.epl';
-}
-
-sub oinfo {
-    return 'Counter to gather statisical data.';
-}
-
 sub new {
     my ($type, $count, $ogroup) = @_;
     
index 4d521d05401f9779fb8e8711a0bf7e1cded988c7..3540d288fa4975511f4353fe723bd7cafb6b425b 100644 (file)
@@ -28,18 +28,6 @@ sub otype_text {
     return 'Disclaimer';
 }
 
-sub oicon {
-    return 'attach.gif';
-}
-
-sub oconfigsite {
-    return '';
-}
-
-sub oinfo {
-    return 'Add a Disclaimer';
-}
-
 sub oisedit {
     return 1;   
 }
index 049a84e5507a3af0515299c5fc56ebd12e47aaaf..48792d10aa557a4ac995723a91f36a6135ad8cf6 100644 (file)
@@ -16,15 +16,6 @@ sub otype_text {
     return 'Domain';
 }
 
-sub oicon {
-    return 'domain.gif';
-}
-
-sub oconfigsite {
-    # fixme: ???
-    return 'item_domain.epl';
-}
-
 sub new {
     my ($type, $address, $ogroup) = @_;
 
index 4e51b2f4c5ebd433b436fe1f208a8acd47f2a6cf..c0d435aafc2dc89a6b47d7b17837877a9392dbfc 100644 (file)
@@ -23,14 +23,6 @@ sub otype_text {
     return 'Match Filename';
 }
 
-sub oicon {
-    return 'matchfile.gif';
-}
-
-sub oinfo {
-    return 'Filter attachments based on filenames or extensions';
-}
-
 sub new {
     my ($type, $fname, $ogroup) = @_;
     
index 43072617b2a959246a2ac4cea62053156bbced42..b4350b21872d6c228fed7837f40c03a8988ffb24 100644 (file)
@@ -32,10 +32,6 @@ sub oicon {
     return 'notify.gif';
 }
 
-sub oinfo {
-    return 'Send a notification Mail';
-}
-
 sub final {
     return 0;
 }
index fa81f9edd61d083970e4f64c27b47b16a417fd7b..3328fa6e84589fb8bc9a5e497bc7c92bc55404c6 100644 (file)
@@ -85,20 +85,6 @@ sub otype_text {
     return "object"; 
 }
 
-sub oicon { 
-    my $self = shift;  
-
-    return "def_icon.gif"; 
-}
-
-sub oconfigsite { 
-    return undef; 
-}
-
-sub oinfo { 
-    return 'object'; 
-}
-
 # some who object only matches 'receivers'
 sub receivertest {
     return 0;
index ef70ee124775ecb808831653453ac49756e3645c..eb423a750e2f77bf6a3c082f86a330f49111d96a 100644 (file)
@@ -25,15 +25,6 @@ sub otype_text {
     return 'Quarantine';
 }
 
-sub oinfo {
-    return 'Move to quarantine.';
-}
-
-sub oicon {
-    # fixme:
-    return 'accept.gif';
-}
-
 sub oisedit {
     return 0;   
 }
@@ -131,7 +122,7 @@ sub execute {
 sub short_desc {
     my $self = shift;
 
-    return oinfo();
+    return 'Move to quarantine.';
 }
 
 1;
index 09051744215c6909a695866cf31bac9d3ad5e347..16d6c15274f639e63200c233691136a2cfe008b7 100644 (file)
@@ -28,14 +28,6 @@ sub oclass {
     return 'action';
 }
 
-sub oicon {
-    return 'remove.gif';
-}
-
-sub oinfo {
-    return 'Remove attachments';
-}
-
 sub oisedit {
     return 1;
 }
index 94eb17fe4fdda2a745dd6bcf042a6da88ace05b4..105a67f8265288ce0ab95b82e115bb084277c825 100644 (file)
@@ -24,14 +24,6 @@ sub otype_text {
     return 'Report Spam';
 }
 
-sub oicon {
-    return 'accept.gif';
-}
-
-sub oinfo {
-    return 'Report Mail as Spam.';
-}
-
 sub oisedit {
     return 0;   
 }
index 8e0af82203fa9e32af2feba9c53b3019c75756eb..aa954217547cb232e3ab110e57a0e82095d232a1 100644 (file)
@@ -26,15 +26,6 @@ sub otype_text {
     return 'Spam Filter';
 }
 
-sub oicon {
-    return 'spam.gif';
-}
-
-
-sub oinfo {
-    return 'Mark all Spam-Emails.';
-}
-
 sub new {
     my ($type, $level, $ogroup) = @_;
     
index 4b63427c3b2059554cfc35e562c1f327a64ace36..177b4fb4271102b18ae4175384353ddabc09e3b0 100644 (file)
@@ -22,20 +22,6 @@ sub otype_text {
     return 'TimeFrame';
 }
 
-sub oicon {
-    return 'timeframe.gif';
-}
-
-sub oconfigsite {
-    # fixme:
-    return 'item_timeframe.epl';
-}
-
-sub oinfo {
-    # fixme:
-    return 'e.g. 12:00 - 13:00';
-}
-
 sub new {
     my ($type, $start, $end, $ogroup) = @_;