]> wagnertech.de Git - mfinanz.git/blobdiff - SL/User.pm
Variablen zwischenspeichern und wiederherstellen, sofern sie existieren, auch wenn...
[mfinanz.git] / SL / User.pm
index 44cd34ab7a6c69d6dfe57357a463eec1d97e45f1..407f7934cf9356944568bb5355bd2a49f376fc6c 100644 (file)
@@ -34,6 +34,8 @@
 
 package User;
 
 
 package User;
 
+#use strict;
+
 use IO::File;
 use Fcntl qw(:seek);
 
 use IO::File;
 use Fcntl qw(:seek);
 
@@ -92,6 +94,7 @@ sub login {
   $main::lxdebug->enter_sub();
 
   my ($self, $form) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self, $form) = @_;
+  our $sid;
 
   local *FH;
 
 
   local *FH;
 
@@ -170,6 +173,7 @@ sub login {
       my $menufile =
         $self->{"menustyle"} eq "v3" ? "menuv3.pl" :
         $self->{"menustyle"} eq "neu" ? "menunew.pl" :
       my $menufile =
         $self->{"menustyle"} eq "v3" ? "menuv3.pl" :
         $self->{"menustyle"} eq "neu" ? "menunew.pl" :
+        $self->{"menustyle"} eq "js" ? "menujs.pl" :
         $self->{"menustyle"} eq "xml" ? "menuXML.pl" :
         "menu.pl";
 
         $self->{"menustyle"} eq "xml" ? "menuXML.pl" :
         "menu.pl";
 
@@ -550,6 +554,12 @@ sub process_query {
         $query .= $char;
       }
     }
         $query .= $char;
       }
     }
+
+    # Insert a space at the end of each line so that queries split
+    # over multiple lines work properly.
+    if ($query ne '') {
+      $query .= @quote_chars ? "\n" : ' ';
+    }
   }
 
   if (ref($version_or_control) eq "HASH") {
   }
 
   if (ref($version_or_control) eq "HASH") {
@@ -680,8 +690,8 @@ sub cmp_script_version {
   $my_a =~ s/.sql$//;
   $my_b =~ s/.*-upgrade-//;
   $my_b =~ s/.sql$//;
   $my_a =~ s/.sql$//;
   $my_b =~ s/.*-upgrade-//;
   $my_b =~ s/.sql$//;
-  ($my_a_from, $my_a_to) = split(/-/, $my_a);
-  ($my_b_from, $my_b_to) = split(/-/, $my_b);
+  my ($my_a_from, $my_a_to) = split(/-/, $my_a);
+  my ($my_b_from, $my_b_to) = split(/-/, $my_b);
 
   $res_a = calc_version($my_a_from);
   $res_b = calc_version($my_b_from);
 
   $res_a = calc_version($my_a_from);
   $res_b = calc_version($my_b_from);
@@ -934,6 +944,7 @@ sub save_member {
   $main::lxdebug->enter_sub();
 
   my ($self) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self) = @_;
+  my $form   = \%main::form;
 
   # format dbconnect and dboptions string
   dbconnect_vars($self, $self->{dbname});
 
   # format dbconnect and dboptions string
   dbconnect_vars($self, $self->{dbname});
@@ -964,7 +975,7 @@ sub create_employee_entry {
   my ($login)  = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $self->{login});
 
   if (!$login) {
   my ($login)  = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $self->{login});
 
   if (!$login) {
-    $query = qq|INSERT INTO employee (login, name, workphone, role) VALUES (?, ?, ?, ?)|;
+    my $query = qq|INSERT INTO employee (login, name, workphone, role) VALUES (?, ?, ?, ?)|;
     do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user"));
   }
 
     do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user"));
   }
 
@@ -974,7 +985,7 @@ sub create_employee_entry {
 sub config_vars {
   $main::lxdebug->enter_sub();
 
 sub config_vars {
   $main::lxdebug->enter_sub();
 
-  my @conf = qw(acs address admin businessnumber company countrycode
+  my @conf = qw(address admin businessnumber company countrycode
     currency dateformat dbconnect dbdriver dbhost dbport dboptions
     dbname dbuser dbpasswd email fax name numberformat password
     printer role sid signature stylesheet tel templates vclimit angebote
     currency dateformat dbconnect dbdriver dbhost dbport dboptions
     dbname dbuser dbpasswd email fax name numberformat password
     printer role sid signature stylesheet tel templates vclimit angebote