Commit 587739db authored by Tino Goratsch's avatar Tino Goratsch

minor fixes and improvements

parent e5de98d6
......@@ -88,8 +88,9 @@ class DateTranslator
}
/**
* @param array $search
* @param array $search
* @param string $translatorPrefix
* @return array
*/
protected function cacheLocalizedDate(array $search, $translatorPrefix)
{
......
......@@ -117,7 +117,9 @@ class Validator
$params['extra']
);
} else {
throw new ValidationRuleNotFoundException('Can not find the validation rule with the name ' . $constraint['rule'] . '.');
throw new ValidationRuleNotFoundException(
'Can not find the validation rule with the name ' . $constraint['rule'] . '.'
);
}
}
......
......@@ -9,7 +9,6 @@ namespace ACP3\Installer\Modules\Install\Controller\Install;
use ACP3\Installer\Core\Controller\AbstractInstallerAction;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
......@@ -58,7 +57,7 @@ class AvailableDatabases extends AbstractInstallerAction
];
return \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
} catch (DBALException $e) {
} catch (\Exception $e) {
return null;
}
}
......
......@@ -24,8 +24,6 @@ jQuery(document).ready(function ($) {
"db_password": $('#db-password').val()
},
function (response) {
$dbName.prop('disabled', false);
if (response.length > 0) {
for (var i = 0; i < response.length; ++i) {
$dbName.append('<option value="' + response[i] + '">' + response[i] + '</option>');
......@@ -36,6 +34,8 @@ jQuery(document).ready(function ($) {
$formGroup.addClass('has-error');
}
}
);
).always(function() {
$dbName.prop('disabled', false);
});
});
});
......@@ -7,7 +7,6 @@
namespace ACP3\Installer\Modules\Install\Validation\ValidationRules;
use ACP3\Core\Validation\ValidationRules\AbstractValidationRule;
use Doctrine\DBAL\DBALException;
/**
* Class DatabaseConnectionValidationRule
......@@ -41,7 +40,8 @@ class DatabaseConnectionValidationRule extends AbstractValidationRule
$db->query('USE `' . $data[$dbName] . '`');
return true;
} catch (DBALException $e) {
} catch (\Exception $e) {
$this->setMessage(sprintf($this->getMessage(), $e->getMessage()));
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment