Bug 29067 - Remove duplicate conditional statement from OPAC messaging settings title
Summary: Remove duplicate conditional statement from OPAC messaging settings title
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 27742
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-20 22:33 UTC by Lari Taskula
Modified: 2022-06-06 20:25 UTC (History)
2 users (show)

See Also:
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


Attachments
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title (1.71 KB, patch)
2021-09-20 22:42 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title (1.76 KB, patch)
2021-09-22 15:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title (1.81 KB, patch)
2021-09-26 10:53 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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