Bug 34859 - reports-home.pl has unnecessary syspref template parameters
Summary: reports-home.pl has unnecessary syspref template parameters
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 01:18 UTC by David Cook
Modified: 2023-10-17 17:24 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11


Attachments
Bug 34859: Remove unnecessary params from reports-home.pl (2.29 KB, patch)
2023-09-21 01:32 UTC, David Cook
Details | Diff | Splinter Review
Bug 34859: Remove unnecessary params from reports-home.pl (2.37 KB, patch)
2023-09-26 16:23 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34859: Remove unnecessary params from reports-home.pl (2.41 KB, patch)
2023-09-27 12:17 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2023-09-21 01:18:21 UTC
./reports/reports-home.pl has unnecessary syspref template parameters.
Comment 1 David Cook 2023-09-21 01:27:29 UTC
I've removed the unnecessary system preference template parameters and I've tidied the code.

This script is pretty much the smallest controller you can make in Koha presently.

(If we were using Mojolicious like in bug 31380, this script would actually be at most a small function within a greater controller module.)
Comment 2 David Cook 2023-09-21 01:32:30 UTC
Created attachment 155965 [details] [review]
Bug 34859: Remove unnecessary params from reports-home.pl

This change removes unnecessary syspref template parameters
and tidies the code.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetNav
2. Add the following and save:
<li><a href="#">Awesome</a></li>
3. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetstylesheet
4. Add the following and save:
http://bad
5. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetcolorstylesheet
6. Add the following and save:
http://bad2
7. Go to /cgi-bin/koha/reports/reports-home.pl
8. Note the "Awesome" link in the top navbar
9. Note in the console that there are two errors where http://bad
and http://bad2 can't be resolved
Comment 3 Matt Blenkinsop 2023-09-26 16:23:21 UTC
Created attachment 156238 [details] [review]
Bug 34859: Remove unnecessary params from reports-home.pl

This change removes unnecessary syspref template parameters
and tidies the code.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetNav
2. Add the following and save:
<li><a href="#">Awesome</a></li>
3. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetstylesheet
4. Add the following and save:
http://bad
5. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetcolorstylesheet
6. Add the following and save:
http://bad2
7. Go to /cgi-bin/koha/reports/reports-home.pl
8. Note the "Awesome" link in the top navbar
9. Note in the console that there are two errors where http://bad
and http://bad2 can't be resolved

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 4 Nick Clemens (kidclamp) 2023-09-27 12:17:18 UTC
Created attachment 156284 [details] [review]
Bug 34859: Remove unnecessary params from reports-home.pl

This change removes unnecessary syspref template parameters
and tidies the code.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetNav
2. Add the following and save:
<li><a href="#">Awesome</a></li>
3. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetstylesheet
4. Add the following and save:
http://bad
5. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetcolorstylesheet
6. Add the following and save:
http://bad2
7. Go to /cgi-bin/koha/reports/reports-home.pl
8. Note the "Awesome" link in the top navbar
9. Note in the console that there are two errors where http://bad
and http://bad2 can't be resolved

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2023-10-04 20:44:06 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-06 00:52:57 UTC
Pushed to 23.05.x for 23.05.05
Comment 7 Matt Blenkinsop 2023-10-17 17:24:41 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x