Bugzilla – Attachment 155858 Details for
Bug 34622
SMTP server edit page unsets is_default if editing default server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34622: Fix store default query
Bug-34622-Fix-store-default-query.patch (text/plain), 1.22 KB, created by
Kyle M Hall (khall)
on 2023-09-18 18:46:06 UTC
(
hide
)
Description:
Bug 34622: Fix store default query
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-09-18 18:46:06 UTC
Size:
1.22 KB
patch
obsolete
>From 7fdd47638d7948e27048b6f95a17992ce0df7efc Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 25 Aug 2023 16:26:10 +0000 >Subject: [PATCH] Bug 34622: Fix store default query >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Exclude self smtp server from all the servers being updated to not default if self is_default > >Signed-off-by: Ãmily-Rose Francoeur <emily-rose.francoeur@inLibro.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/SMTP/Server.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/SMTP/Server.pm b/Koha/SMTP/Server.pm >index 44d3158aa81..f85b34e3d7d 100644 >--- a/Koha/SMTP/Server.pm >+++ b/Koha/SMTP/Server.pm >@@ -44,9 +44,9 @@ sub store { > > $self->_result->result_source->schema->txn_do( > sub { >- Koha::SMTP::Servers->search->update( { is_default => 0 }, >- { no_triggers => 1 } ) >- if $self->is_default; >+ Koha::SMTP::Servers->search( { id => { '!=' => $self->id } } ) >+ ->update( { is_default => 0 }, { no_triggers => 1 } ) >+ if $self->is_default; > > $self = $self->SUPER::store; > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34622
:
154837
|
155561
| 155858