Bug 29067

Summary: Remove duplicate conditional statement from OPAC messaging settings title
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: OPACAssignee: Lari Taskula <lari.taskula>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, kyle
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05
Bug Depends on: 27742    
Bug Blocks:    
Attachments: Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title

Description Lari Taskula 2021-09-20 22:33:36 UTC
There is a duplicate conditional statement in OPAC messaging settings <title>.

We need to check LibraryNameTitle just once.
Comment 1 Lari Taskula 2021-09-20 22:42:20 UTC
Created attachment 125083 [details] [review]
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title

We can never reach the first [% ELSE %]Koha online[% END %] block in OPAC
messaging preferences title, so it's dead code.

This patch removes the useless duplicate if-statement.

To test:
1. Enable EnhancedMessagingPreferencesOPAC system preference
2. Go to /cgi-bin/koha/opac-messaging.pl
3. Observe title Your messaging settings > Koha online catalog
4. Apply patch
5. Refresh page /cgi-bin/koha/opac-messaging.pl
6. Observe same title Your messaging settings > Koha online catalog
7. See patch content
8. Confirm there are no functional changes in the new logic
Comment 2 Owen Leonard 2021-09-22 15:04:29 UTC
Created attachment 125139 [details] [review]
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title

We can never reach the first [% ELSE %]Koha online[% END %] block in OPAC
messaging preferences title, so it's dead code.

This patch removes the useless duplicate if-statement.

To test:
1. Enable EnhancedMessagingPreferencesOPAC system preference
2. Go to /cgi-bin/koha/opac-messaging.pl
3. Observe title Your messaging settings > Koha online catalog
4. Apply patch
5. Refresh page /cgi-bin/koha/opac-messaging.pl
6. Observe same title Your messaging settings > Koha online catalog
7. See patch content
8. Confirm there are no functional changes in the new logic

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2021-09-26 10:53:13 UTC
Created attachment 125315 [details] [review]
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title

We can never reach the first [% ELSE %]Koha online[% END %] block in OPAC
messaging preferences title, so it's dead code.

This patch removes the useless duplicate if-statement.

To test:
1. Enable EnhancedMessagingPreferencesOPAC system preference
2. Go to /cgi-bin/koha/opac-messaging.pl
3. Observe title Your messaging settings > Koha online catalog
4. Apply patch
5. Refresh page /cgi-bin/koha/opac-messaging.pl
6. Observe same title Your messaging settings > Koha online catalog
7. See patch content
8. Confirm there are no functional changes in the new logic

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-09-28 13:39:51 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-10-08 12:26:52 UTC
Pushed to 21.05.x for 21.05.05
Comment 6 Fridolin Somers 2021-10-21 03:16:40 UTC
Depends on Bug 27742 not in 20.11.x