If you hit /cgi-bin/koha/installer/install.pl and that the DB is up-to-date already, the screen shows "We are upgrading from Koha 23.06.00.002 to 23.06.00.002"
Created attachment 152098 [details] [review] Bug 33938: Don't tell the DB is not up-to-date when it is If you hit /cgi-bin/koha/installer/install.pl and that the DB is up-to-date already, the screen shows "We are upgrading from Koha 23.06.00.002 to 23.06.00.002". We should just say that everything is ok Test plan: Have an up-to-date DB, then hit /cgi-bin/koha/installer/install.pl Notice that the message changed and is more correct with the patch applied.
Created attachment 152232 [details] [review] Bug 33938: Don't tell the DB is not up-to-date when it is If you hit /cgi-bin/koha/installer/install.pl and that the DB is up-to-date already, the screen shows "We are upgrading from Koha 23.06.00.002 to 23.06.00.002". We should just say that everything is ok Test plan: Have an up-to-date DB, then hit /cgi-bin/koha/installer/install.pl Notice that the message changed and is more correct with the patch applied. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This feels wrong to me. We shouldn't have the comparison check in the templates. It should be in the controller script. Also, it doesn't take into account atomic updates. I'd raised bug 34088 to handle this scenario for updatedatabase.pl but hadn't gotten around to install.pl.
(In reply to David Cook from comment #3) > This feels wrong to me. We shouldn't have the comparison check in the > templates. It should be in the controller script. Are you suggesting to make the comparison in the pl then pass a variable 'needs_upgrade' if dbversion != kohaversion?
If I hit this URL, I need to login first with the admin user to discover that the version is the same. We could do better than that?
(In reply to Jonathan Druart from comment #4) > Are you suggesting to make the comparison in the pl then pass a variable > 'needs_upgrade' if dbversion != kohaversion? Well, there is already an "upgrading" variable which seems to be set without checking that upgrading is necessary. I think that we should fix it there.
(In reply to Marcel de Rooy from comment #5) > If I hit this URL, I need to login first with the admin user to discover > that the version is the same. We could do better than that? That's a good point too. Near the top of install.pl, we could do an upgrade check (I'd suggest the one from bug 34088) and if an upgrade isn't required, redirect to mainpage.pl.