diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2015-01-25 14:09:55 +0100 |
---|---|---|
committer | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2015-01-25 19:15:21 +0100 |
commit | e6185fb9a55ee47b3497c0150762e07d3538bdc2 (patch) | |
tree | 9efcf8c1d3782770c58bb74da7d765bc6a572fcd /Kernel/System | |
parent | f9f961a91ced51c1f816761c70c08fdf499331fd (diff) | |
download | DefaultRecipient-e6185fb9a55ee47b3497c0150762e07d3538bdc2.tar.gz DefaultRecipient-e6185fb9a55ee47b3497c0150762e07d3538bdc2.tar.bz2 DefaultRecipient-e6185fb9a55ee47b3497c0150762e07d3538bdc2.zip |
Remove AddNew.
If you do not want to add a new recipient, simply leave the NewAddress
field empty.
Diffstat (limited to 'Kernel/System')
-rw-r--r-- | Kernel/System/DefaultRecipient.pm | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Kernel/System/DefaultRecipient.pm b/Kernel/System/DefaultRecipient.pm index aae4932..82a366b 100644 --- a/Kernel/System/DefaultRecipient.pm +++ b/Kernel/System/DefaultRecipient.pm @@ -31,7 +31,7 @@ sub Add { my ( $Self, %Param ) = @_; # check needed stuff - for my $Needed (qw(Title RemoveTo AddNew NewAddress Comment UserID)) { + for my $Needed (qw(Title RemoveTo NewAddress Comment UserID)) { if ( ! defined $Param{$Needed} ) { my $LogObject = $Kernel::OM->Get('Kernel::System::Log'); $LogObject->Log( @@ -47,13 +47,12 @@ sub Add { # insert new DefaultRecipient return if !$DBObject->Do( SQL => 'INSERT INTO default_recipient ' - . '(title, remove_to, add_new, new_address, comments, ' + . '(title, remove_to, new_address, comments, ' . ' create_time, create_by, change_time, change_by) ' - . 'VALUES (?, ?, ?, ?, ?, current_timestamp, ?, current_timestamp, ?)', + . 'VALUES (?, ?, ?, ?, current_timestamp, ?, current_timestamp, ?)', Bind => [ \$Param{Title}, \$Param{RemoveTo}, - \$Param{AddNew}, \$Param{NewAddress}, \$Param{Comment}, \$Param{UserID}, @@ -87,8 +86,7 @@ sub Update { my ( $Self, %Param ) = @_; # check needed stuff - for my $Needed (qw(ID Title RemoveTo AddNew NewAddress Comment - UserID)) { + for my $Needed (qw(ID Title RemoveTo NewAddress Comment UserID)) { if ( ! defined $Param{$Needed} ) { my $LogObject = $Kernel::OM->Get('Kernel::System::Log'); $LogObject->Log( @@ -104,13 +102,12 @@ sub Update { # insert new DefaultRecipient return if !$DBObject->Do( SQL => 'UPDATE default_recipient SET title = ?, remove_to = ?, ' - . 'add_new = ?, new_address = ?, comments = ?, change_by = ?, ' + . 'new_address = ?, comments = ?, change_by = ?, ' . 'change_time = current_timestamp ' . 'WHERE id = ?', Bind => [ \$Param{Title}, \$Param{RemoveTo}, - \$Param{AddNew}, \$Param{NewAddress}, \$Param{Comment}, \$Param{UserID}, @@ -138,7 +135,7 @@ sub Get { # get RrsponseChangeDefaultTO obejct return if !$DBObject->Prepare( - SQL => 'SELECT id, title, remove_to, add_new, new_address, ' + SQL => 'SELECT id, title, remove_to, new_address, ' . 'comments, create_time, create_by, change_time, change_by ' . 'FROM default_recipient WHERE id = ?', Bind => [ \$Param{ID} ], @@ -151,13 +148,12 @@ sub Get { ID => $Data[0], Title => $Data[1], RemoveTo => $Data[2], - AddNew => $Data[3], - NewAddress => $Data[4], - Comment => $Data[5], - CreateTime => $Data[6], - CreateBy => $Data[7], - ChangeTime => $Data[8], - ChangeBy => $Data[9], + NewAddress => $Data[3], + Comment => $Data[4], + CreateTime => $Data[5], + CreateBy => $Data[6], + ChangeTime => $Data[7], + ChangeBy => $Data[8], ); } |