NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489 it's not longer possible. We could remove the code. We also have 2 TT variables: LoginBranchcode, LoginBranchname And 1 template method, Branches.GetLoggedInBranchcode. We could simplify and unify that code
NO_LIBRARY_SET is also used for the initial web install, which requires the DB user. So, probably not entirely removing NO_LIBRARY_SET, because the branches table won't even exist at the initial web install.
I can confirm it's fixed now - looks like we forgot to close the bug!
(In reply to Katrin Fischer from comment #2) > I can confirm it's fixed now - looks like we forgot to close the bug! Sorry, wrong bug!
Created attachment 98934 [details] [review] Bug 21746: Remove NO_LIBRARY_SET NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489 it's not longer possible. We could remove the code. One occurrence left in C4::InstallAuth as there is no (real) logged in user yet.
Created attachment 98935 [details] [review] Bug 21746: Remove LoginBranchname and LoginBranchcode Those 2 variables can be replaced by logged_in_user that is passed to all the template via C4::Auth
Created attachment 98936 [details] [review] Bug 21746: Remove GetLoggedInBranchcode This method from the Branches TT plugin is not needed as we can use logged_in_user
Created attachment 98937 [details] [review] Bug 21746: Remove 3 more uneeded variables from C4::Auth They are not used in the templates
Test plan: * Install Koha to make sure NO_LIBRARY_SET is not needed during the install process * Loggin into Koha * Make sure the your library's name is displayed correctly in the header * Set another library * Confirm that the library's name is updated Other occurrences will be check by QA that will make sure there is no typo in the patches
(In reply to Jonathan Druart from comment #8) > Test plan: > * Confirm that the library's name is updated This didn't work in my test. The previous library name still showed up.
Created attachment 99071 [details] [review] Bug 21746: Remove NO_LIBRARY_SET NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489 it's not longer possible. We could remove the code. One occurrence left in C4::InstallAuth as there is no (real) logged in user yet. Test plan: * Install Koha to make sure NO_LIBRARY_SET is not needed during the install process * Login into Koha * Make sure the your library's name is displayed correctly in the header * Set another library * Confirm that the library's name is updated
(In reply to Owen Leonard from comment #9) > (In reply to Jonathan Druart from comment #8) > > Test plan: > > * Confirm that the library's name is updated > > This didn't work in my test. The previous library name still showed up. Yes, sorry about that. I revived patches I had on a local branch, but they went to far and were wrong. Only the first patch is relevant here.
Created attachment 99681 [details] [review] Bug 21746: Remove NO_LIBRARY_SET NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489 it's not longer possible. We could remove the code. One occurrence left in C4::InstallAuth as there is no (real) logged in user yet. Test plan: * Install Koha to make sure NO_LIBRARY_SET is not needed during the install process * Login into Koha * Make sure the your library's name is displayed correctly in the header * Set another library * Confirm that the library's name is updated Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No problem during install, nor changing library. Fixed (pre-existing) tab in circ/branchtransfers.pl No errors
Created attachment 99833 [details] [review] Bug 21746: Remove NO_LIBRARY_SET NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489 it's not longer possible. We could remove the code. One occurrence left in C4::InstallAuth as there is no (real) logged in user yet. Test plan: * Install Koha to make sure NO_LIBRARY_SET is not needed during the install process * Login into Koha * Make sure the your library's name is displayed correctly in the header * Set another library * Confirm that the library's name is updated Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No problem during install, nor changing library. Fixed (pre-existing) tab in circ/branchtransfers.pl No errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11.x