[Koha-bugs] [Bug 7167] updatedatabase improvements

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Dec 23 14:08:54 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7167

--- Comment #222 from Jonathan Druart <jonathan.druart at biblibre.com> ---
(In reply to comment #221)
> (In reply to comment #220)
> > > The kohaversion.pl is still used. So we cannot remove the '$koha39' variable
> > > and we have to continue to increment the kohaversion.pl number.
> > 
> > Hm, in that case comment 10 is wrong? I'll update my patch on bug 9191 to
> > add and use a C4::Context->final_linear_version routine, which we can then
> > use in place of $koha39.
> 
> Could you confirm that this is correct, and kohaversion.pl will continue to
> be incremented?

Which point of comment 10 seems wrong to you? Here are some points addressed in
the comment:

* version is checked on mainpage.pl (and here only). If syspref Version differ
from kohaversion.pl, the old updatedatabase is launched. If there are updates
missing from new mechanism, the updatedatabase page is reached
=> I think that it is not really what we want : "If syspref Version differ from
kohaversion.pl, the old updatedatabase is launched" is wrong.

* kohaversion check on each page is now useless in Auth.pm, removed dead code
=> It is correct

* Updated installer: at the end of the process, retrieve all updates and
automatically mark them "OK", as they're included in installer
=> It is not correct.

In fact, to resume what I understand:

The Bug 9191 introduces the final_linear_version routine. When you will push
the new feature, the routine will return a constant 3.11.00.XXX version.
The C4::Auth::version_check routine must then be rewritten as:

    # Old updatedatabase method
    if (C4::Context->preference('Version') <=
C4::Context->final_linear_version) {
        print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3");
        safe_exit;
    }

    # New updatedatabase method
    unless ( C4::Update::Database::is_uptodate() ) {
        # not up-to-date, redirect to updatedatabase page
        warn "redirect to updatedatabase";
        print $query->redirect(-location =>
"/cgi-bin/koha/admin/updatedatabase.pl", -cookie => $cookie);
       safe_exit;
    }


(I just change the first conditionnal test)

So the kohaversion.pl could be incremented depending on the utility we have of
it.

Right now I don't have the code to check if this version is just used for the
about page or somewhere else.

I hope I answered to your question.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list