Bug 7857 - invalidate cached preferences after SetVersion
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 5 Apr 2012 12:15:30 +0000 (14:15 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 20 Jun 2012 19:32:33 +0000 (21:32 +0200)
This allows plack to correctly move to login page after database upgrade

installer/data/mysql/updatedatabase.pl

index 1b6fe84..0a2aea9 100755 (executable)
@@ -5459,6 +5459,7 @@ sub SetVersion {
       my $finish=$dbh->prepare("INSERT into systempreferences (variable,value,explanation) values ('Version',?,'The Koha database version. WARNING: Do not change this value manually, it is maintained by the webinstaller')");
       $finish->execute($kohaversion);
     }
+    C4::Context::clear_syspref_cache(); # invalidate cached preferences
 }
 exit;