Attachments (more than one) do not follow the transaction after editing. Fixed.
[fa-stable.git] / access / login.php
index c1d1ebf94c6bd429bc3f096eacd7f99e4778f7b2..2e8e9d26614056276bea174779c4a20ab1294cda 100644 (file)
@@ -112,14 +112,16 @@ function defaultCompany()
                        $coy =  user_company();
                        if (!isset($coy))
                                $coy = $def_coy;
-                       if (!@$SysPrefs->text_company_selection) {
-                               echo "<tr><td>"._("Company")."</td><td><select name='company_login_name'>\n";
-                               for ($i = 0; $i < count($db_connections); $i++)
-                                       echo "<option value=$i ".($i==$coy ? 'selected':'') .">" . $db_connections[$i]["name"] . "</option>";
-                               echo "</select>\n";
-                               echo "</td></tr>";
-                       } else {
-                               text_row(_("Company"), "company_login_nickname", "", 20, 50);
+                       if (isset($db_connections)) {
+                               if (!@$SysPrefs->text_company_selection) {
+                                       echo "<tr><td>"._("Company")."</td><td><select name='company_login_name'>\n";
+                                       for ($i = 0; $i < count($db_connections); $i++)
+                                               echo "<option value=$i ".($i==$coy ? 'selected':'') .">" . $db_connections[$i]["name"] . "</option>";
+                                       echo "</select>\n";
+                                       echo "</td></tr>";
+                               } else {
+                                       text_row(_("Company"), "company_login_nickname", "", 20, 50);
+                               }
                        }
                }
        }