diff --git a/lam/templates/config/conflogin.php b/lam/templates/config/conflogin.php index d5538e02..6121e52d 100644 --- a/lam/templates/config/conflogin.php +++ b/lam/templates/config/conflogin.php @@ -156,7 +156,7 @@ echo $_SESSION['header']; $group = new htmlTable(); $profiles = array(); $selectedProfile = array(); - $fieldsEnabled = false; + $profilesExisting = false; if (sizeof($files) > 0) { $profiles = $files; if (!empty($_COOKIE["lam_default_profile"]) && in_array($_COOKIE["lam_default_profile"], $files)) { @@ -165,18 +165,18 @@ echo $_SESSION['header']; else { $selectedProfile[] = $conf->default; } - $fieldsEnabled = true; + $profilesExisting = true; } $select = new htmlSelect('filename', $profiles, $selectedProfile); - $select->setIsEnabled($fieldsEnabled); + $select->setIsEnabled($profilesExisting); $group->addElement($select); $passwordField = new htmlInputField('passwd'); $passwordField->setIsPassword(true); - $passwordField->setIsEnabled($fieldsEnabled); + $passwordField->setIsEnabled($profilesExisting); $passwordField->setFieldSize(20); $group->addElement($passwordField); $button = new htmlButton('submit', _("Ok")); - $button->setIsEnabled($fieldsEnabled); + $button->setIsEnabled($profilesExisting); $group->addElement($button); $group->addElement(new htmlHelpLink('200')); $tabindex = 1; diff --git a/lam/tests/lib/LAMConfigTest.php b/lam/tests/lib/LAMConfigTest.php index f48c6f62..b763662a 100644 --- a/lam/tests/lib/LAMConfigTest.php +++ b/lam/tests/lib/LAMConfigTest.php @@ -25,6 +25,8 @@ include_once (dirname ( __FILE__ ) . '/../utils/configuration.inc'); /** * LAMConfig test case. + * + * @author Roland Gruber */ class LAMConfigTest extends PHPUnit_Framework_TestCase {