]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Alle Vorkommen von all_departments abgesichert.
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 5 Nov 2009 16:48:03 +0000 (17:48 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 5 Nov 2009 16:48:03 +0000 (17:48 +0100)
SL/Form.pm
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/ca.pl
bin/mozilla/cp.pl
bin/mozilla/dn.pl
bin/mozilla/gl.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/rp.pl

index 1668252fb62b06c142e38c7e98fc0a11936b7f82..579b1ef65cdfbbf8faf669c58811d91fa0ea68d5 100644 (file)
@@ -2740,7 +2740,7 @@ sub all_departments {
                  ORDER BY description|;
   $self->{all_departments} = selectall_hashref_query($self, $dbh, $query);
 
                  ORDER BY description|;
   $self->{all_departments} = selectall_hashref_query($self, $dbh, $query);
 
-  delete($self->{all_departments}) unless (@{ $self->{all_departments} });
+  delete($self->{all_departments}) unless (@{ $self->{all_departments} || [] });
 
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
index 8f643e57ef2458bf3d499a02996113ff29cd1a1f..80680efc643a054544962479ed6dc428541f4c07 100644 (file)
@@ -170,14 +170,14 @@ sub create_links {
   }
 
   # departments
   }
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
@@ -1222,13 +1222,13 @@ sub search {
   }
 
   # departments
   }
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   my $department = qq|
   }
 
   my $department = qq|
index ced937e2bd32082d30948963335ac4cf52f5b2b4..2094ead3ac34c7bce7ca99ec54a91d92392667e0 100644 (file)
@@ -180,23 +180,23 @@ sub create_links {
   }
 
   # departments
   }
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
 
   # sales staff
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
 
   # sales staff
-  if (@{ $form->{all_employees} }) {
+  if (@{ $form->{all_employees} || [] }) {
     $form->{selectemployee} = "";
     map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
     $form->{selectemployee} = "";
     map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
-      (@{ $form->{all_employees} });
+      (@{ $form->{all_employees} || [] });
   }
 
   # build the popup menus
   }
 
   # build the popup menus
@@ -1278,13 +1278,13 @@ sub search {
   }
 
   # departments
   }
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   $department = qq|
   }
 
   $department = qq|
index 3c68b0b8a9fe93dc5e2e679d98fd8b5996769198..b35b66495ce2c35c52c5856fcf1a89f6b08674c3 100644 (file)
@@ -167,7 +167,7 @@ sub list {
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   my $department = qq|
   }
 
   my $department = qq|
index 195a05153b7448cc0c72dfdaa2333a7b30b3aab7..c19cc53128fdb586bcf5bfd102759d431db74b0e 100644 (file)
@@ -74,14 +74,14 @@ sub payment {
   }
 
   # departments
   }
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
     $form->{department}       = "$form->{department}--$form->{department_id}";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   CP->paymentaccounts(\%myconfig, \%$form);
   }
 
   CP->paymentaccounts(\%myconfig, \%$form);
index 51e046c8693a135fb16216d5b6a7f89576f1b37e..180765cba1e41ca90f8968c46e7cb1c1dc3fc5dc 100644 (file)
@@ -102,7 +102,7 @@ sub add {
 
   $form->{SHOW_CUSTOMER_SELECTION}      = $form->{all_customer}    && scalar @{ $form->{all_customer} };
   $form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING}         && scalar @{ $form->{DUNNING} };
 
   $form->{SHOW_CUSTOMER_SELECTION}      = $form->{all_customer}    && scalar @{ $form->{all_customer} };
   $form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING}         && scalar @{ $form->{DUNNING} };
-  $form->{SHOW_DEPARTMENT_SELECTION}    = $form->{all_departments} && scalar @{ $form->{all_departments} };
+  $form->{SHOW_DEPARTMENT_SELECTION}    = $form->{all_departments} && scalar @{ $form->{all_departments} || [] };
 
   $form->{title}    = $locale->text('Start Dunning Process');
   $form->{jsscript} = 1;
 
   $form->{title}    = $locale->text('Start Dunning Process');
   $form->{jsscript} = 1;
index 731f525767357c38d45bc2bfd75dec6041c71dd6..4b34a5080690a3205842396ad9065b7919047cb4 100644 (file)
@@ -110,13 +110,13 @@ sub add {
 
   # departments
   $form->all_departments(\%myconfig);
 
   # departments
   $form->all_departments(\%myconfig);
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   $form->{show_details} = $myconfig{show_form_details} unless defined $form->{show_details};
   }
 
   $form->{show_details} = $myconfig{show_form_details} unless defined $form->{show_details};
@@ -146,13 +146,13 @@ sub prepare_transaction {
 
   # departments
   $form->all_departments(\%myconfig);
 
   # departments
   $form->all_departments(\%myconfig);
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   my $i        = 1;
   }
 
   my $i        = 1;
@@ -240,13 +240,13 @@ sub search {
   $form->all_departments(\%myconfig);
 
   # departments
   $form->all_departments(\%myconfig);
 
   # departments
-  if (@{ $form->{all_departments} }) {
+  if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     $form->{selectdepartment} = "<option>\n";
 
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   my $department = qq|
   }
 
   my $department = qq|
index d848abc64f2a9c54cb57fe5215a91f7c91a63a7c..c599c832510c905ffc83e4e34be8de885a023ae0 100644 (file)
@@ -153,7 +153,7 @@ sub invoice_links {
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   # forex
   }
 
   # forex
index 177b0e3f542fe89620e53be423f7365bbbf2f1c4..6beb17c80aa640a4d7c31f152bd9f53ef2536c58 100644 (file)
@@ -196,7 +196,7 @@ sub invoice_links {
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}</option>\n"
     map {
       $form->{selectdepartment} .=
         "<option>$_->{description}--$_->{id}</option>\n"
-    } (@{ $form->{all_departments} });
+    } (@{ $form->{all_departments} || [] });
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
   }
 
   $form->{employee} = "$form->{employee}--$form->{employee_id}";
index 25c8bcc4ebfa33bec2a6c3b0ef91e1bb4fae7a2f..5099c899551d9d1171fd3fad1b3dfba6f841674b 100644 (file)
@@ -156,7 +156,7 @@ sub report {
   $form->all_departments(\%myconfig);
   if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
   $form->all_departments(\%myconfig);
   if (@{ $form->{all_departments} || [] }) {
     $form->{selectdepartment} = "<option>\n";
-    map { $form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $form->{all_departments} };
+    map { $form->{selectdepartment} .= "<option>$_->{description}--$_->{id}\n" } @{ $form->{all_departments} || [] };
   }
 
   my $department = qq|
   }
 
   my $department = qq|