Bug 24526: Add the confirm flag to the cronjob files
[koha-ffzg.git] / circ / selectbranchprinter.pl
index 03fa65b..0febd0f 100755 (executable)
@@ -62,6 +62,7 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) {
         $template->param(LoginBranchcode => $branch);       # update template for new branch
         $session->param('branchname', $branchname);         # update sesssion in DB
         $session->param('branch', $branch);                 # update sesssion in DB
+        $session->flush();
         push @updated, {
             updated_branch => 1,
                 old_branch => $userenv_branch,
@@ -79,6 +80,7 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) {
 if ($printer) {
     if (! $userenv_printer or $userenv_printer ne $printer ) {
         $session->param('branchprinter', $printer);         # update sesssion in DB
+        $session->flush();
         $template->param('new_printer', $printer);          # update template
         push @updated, {
             updated_printer => 1,