Merge branch 'sorted-helper'
[kivitendo-erp.git] / bin / mozilla / admin.pl
index 0e61c3c..2819da0 100755 (executable)
@@ -43,6 +43,7 @@ use Sys::Hostname;
 
 use SL::Auth;
 use SL::Form;
+use SL::Iconv;
 use SL::Mailer;
 use SL::User;
 use SL::Common;
@@ -84,6 +85,9 @@ sub run {
         $::auth->set_session_value('rpw', $::form->{rpw});
         $::auth->create_or_refresh_session();
       }
+
+      _apply_dbupgrade_scripts();
+
       call_sub($locale->findsub($form->{action}));
     }
   } else {
@@ -1162,4 +1166,8 @@ sub dispatcher {
   $form->error($locale->text('No action defined.'));
 }
 
+sub _apply_dbupgrade_scripts {
+  ::end_of_request() if SL::DBUpgrade2->new(form => $::form, dbdriver => 'Pg', auth => 1)->apply_admin_dbupgrade_scripts(1);
+}
+
 1;