/**
* Validate if the module can be installed.
*/
private function validateInstall()
{
// already installed
if (BackendModel::isModuleInstalled($this->currentModule)) {
$this->redirect(BackendModel::createURLForAction('Modules') . '&error=already-installed&var=' . $this->currentModule);
}
// no installer class present
if (!is_file(BACKEND_MODULES_PATH . '/' . $this->currentModule . '/Installer/Installer.php')) {
$this->redirect(BackendModel::createURLForAction('Modules') . '&error=no-installer-file&var=' . $this->currentModule);
}
}