Bug 34478: Add cud to updatestructure

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-27 15:34:40 +01:00
parent 74d7ae7672
commit ff4b63d5c5
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
3 changed files with 16 additions and 4 deletions

View file

@ -776,7 +776,7 @@ sub _version_check {
my $warning = "Database update needed, redirecting to %s. Database is $version and Koha is $kohaversion";
if ( $type ne 'opac' ) {
warn sprintf( $warning, 'Installer' );
print $query->redirect("/cgi-bin/koha/installer/install.pl?step=1&op=updatestructure");
print $query->redirect("/cgi-bin/koha/installer/install.pl");
} else {
warn sprintf( "OPAC: " . $warning, 'maintenance' );
print $query->redirect("/cgi-bin/koha/maintenance.pl");

View file

@ -372,7 +372,7 @@ elsif ( $step && $step == 3 ) {
"error" => $error,
);
}
elsif ( $op eq 'updatestructure' ) {
elsif ( $op eq 'cud-updatestructure' ) {
#
# Not 1st install, the only sub-step : update database
#

View file

@ -326,7 +326,12 @@
[% IF ( upgrading ) %]
<h1>Web installer &rsaquo; Update database</h1>
<p>We are upgrading from Koha [% dbversion | html %] to [% kohaversion | html %]</p>
<p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Update your database</a></p>
<form action="/cgi-bin/koha/installer/install.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="cud-updatestructure" />
<p><input value="Update your database" class="btn btn-primary" type="submit" /></p>
</form>
[% ELSE %]
<h1>Web installer &rsaquo; Install basic configuration settings</h1>
@ -453,7 +458,14 @@
<p>Everything went okay. Update done.</p>
<p><a href="install.pl?step=3&amp;op=finished" class="btn btn-primary">Continue to log in to Koha</a></p>
[% ELSE %]
<p><a href="install.pl?step=3&amp;op=updatestructure" class="btn btn-primary">Try again</a></p>
<p>
<form action="/cgi-bin/koha/installer/install.pl" method="post">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="step" value="3" />
<input type="hidden" name="op" value="cud-updatestructure" />
<p><input value="Try again" class="btn btn-primary" type="submit" /></p>
</form>
</p>
[% END %]
[% END # / IF updatestructure %]
</div> <!-- / #installer-step3 -->