Skip to content

Commit

Permalink
Tweaked legacy installer as parts for v old installations were incorr…
Browse files Browse the repository at this point in the history
…ect.
  • Loading branch information
jomres committed May 27, 2020
1 parent 53bc5ad commit 1c2f2d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions database/legacy/legacy.php
Expand Up @@ -19,7 +19,7 @@
$result = true;
if (file_exists(JOMRESCONFIG_ABSOLUTE_PATH.JRDS.JOMRES_ADMINISTRATORDIRECTORY.JRDS.'components'.JRDS.'com_jomres'.JRDS.'admin.jomres.php')) {
if (!unlink(JOMRESCONFIG_ABSOLUTE_PATH.JRDS.JOMRES_ADMINISTRATORDIRECTORY.JRDS.'components'.JRDS.'com_jomres'.JRDS.'admin.jomres.php')) {
$this->setMessage('Error, tried to delete '.JOMRESCONFIG_ABSOLUTE_PATH.JRDS.JOMRES_ADMINISTRATORDIRECTORY.JRDS.'components'.JRDS.'com_jomres'.JRDS.'admin.jomres.php'.'. However, file permissions prevent this from happening, so you MUST delete this file before you can continue with the upgrade. This file is not used by Joomla 3.x+', 'danger');
throw new Exception('Error, tried to delete '.JOMRESCONFIG_ABSOLUTE_PATH.JRDS.JOMRES_ADMINISTRATORDIRECTORY.JRDS.'components'.JRDS.'com_jomres'.JRDS.'admin.jomres.php'.'. However, file permissions prevent this from happening, so you MUST delete this file before you can continue with the upgrade. This file is not used by Joomla 3.x+');
}
}
}
Expand Down Expand Up @@ -53,8 +53,7 @@
createExtraIndexs();
}
catch (Exception $e) {
$this->setMessage('Error, something went wrong when running the legacy installer, Jomres may not be installed properly.', 'danger');
$this->setMessage($e->getMessage());
echo 'Error, something went wrong when running the legacy installer, Jomres may not be installed properly.';
}

/**
Expand Down Expand Up @@ -1610,7 +1609,7 @@ function createPfeaturesCategoriesTable()
";

if (!doInsertSql($query)) {
$this->setMessage('Error, unable to insert sample data in the #__jomres_hotel_features_categories table', 'danger');
throw new Exception('Error, unable to insert sample data in the #__jomres_hotel_features_categories table');
}

}
Expand Down

0 comments on commit 1c2f2d8

Please sign in to comment.