Uninstaller seems to be working... I think :P

master
Mike Koch 7 years ago
parent 7aa7526a17
commit e98213ad4c
No known key found for this signature in database
GPG Key ID: 9BA5D7F8391455ED

@ -157,34 +157,13 @@ if (hesk_dbNumRows($tableSql) > 0) {
</div>
<ul class="dropdown-menu">
<li><a href="<?php echo HESK_PATH; ?>install/database-validation.php"><i class="fa fa-check-circle"></i> Database Validator</a></li>
<li><a href="#" data-toggle="modal"
data-target="#uninstallModal"><i class="fa fa-trash"></i> Uninstall Mods for HESK</a></li>
<li><a href="<?php echo HESK_PATH; ?>install/uninstall.php"><i class="fa fa-trash"></i> Uninstall Mods for HESK</a></li>
</ul>
<div class="btn btn-primary pull-right" id="next-button">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-chevron-right"></i></div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="uninstallModal" tabindex="-1" role="dialog" aria-labelledby="uninstallModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="uninstallModalTitle"><i class="fa fa-trash"></i> Uninstall Mods for HESK
</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to uninstall Mods for HESK?</p>
</div>
<div class="modal-footer">
<a class="btn btn-success" href="<?php echo HESK_PATH; ?>install/uninstallModsForHesk.php"><i class="fa fa-check"></i> Yes</a>
<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> No
</button>
</div>
</div>
</div>
</div>
<p id="hesk-path" style="display: none"><?php echo HESK_PATH; ?></p>
</body>
</html>

@ -81,8 +81,8 @@ function uninstall() {
success: function(data) {
data = JSON.parse(data);
$('[data-step="install-or-update"] > #spinner').hide();
$('[data-step="install-or-update"] > .progress').show();
$('[data-step="uninstall"] > #spinner').hide();
$('[data-step="uninstall"] > .progress').show();
// Recursive call that will increment by 1 each time
executeMigration(startingMigrationNumber, 1, 'down');
@ -104,8 +104,8 @@ function executeMigration(migrationNumber, latestMigrationNumber, direction) {
console.log('migrationNumber: ' + migrationNumber);
console.log('latestMigrationNumber: ' + latestMigrationNumber);
console.info('---');
if (migrationNumber === latestMigrationNumber || (migrationNumber === 1 && direction === 'down')) {
updateProgressBar(migrationNumber, latestMigrationNumber, direction === 'down', true);
if (migrationNumber === latestMigrationNumber) {
updateProgressBar(migrationNumber, latestMigrationNumber, false, true);
console.log('%c Success! ', 'color: white; background-color: green; font-size: 2em');
} else {
updateProgressBar(migrationNumber, latestMigrationNumber, false, false);
@ -124,12 +124,6 @@ function executeMigration(migrationNumber, latestMigrationNumber, direction) {
updateProgressBar(migrationNumber, latestMigrationNumber, true, false);
if (direction === 'up') {
// Revert!
executeMigration(migrationNumber - 1, latestMigrationNumber, 'down');
} else {
console.error("I even failed to roll back. Yikes! :'(");
}
console.error(message);
}
})

@ -146,32 +146,15 @@ if (hesk_dbNumRows($tableSql) > 0) {
</div>
<?php // END INSTALL SCREENS ?>
<div id="buttons">
<a href="<?php echo HESK_PATH; ?>/install/index.php" class="btn btn-default" id="tools-button">
<i class="fa fa-chevron-left"></i>&nbsp;&nbsp;&nbsp;Back to installer
</a>
<div class="btn btn-primary" id="back-button" style="display: none;"><i class="fa fa-chevron-left"></i>&nbsp;&nbsp;&nbsp;Back</div>
<div class="btn btn-primary pull-right" id="next-button">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-chevron-right"></i></div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="uninstallModal" tabindex="-1" role="dialog" aria-labelledby="uninstallModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="uninstallModalTitle"><i class="fa fa-trash"></i> Uninstall Mods for HESK
</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to uninstall Mods for HESK?</p>
</div>
<div class="modal-footer">
<a class="btn btn-success" href="<?php echo HESK_PATH; ?>install/uninstallModsForHesk.php"><i class="fa fa-check"></i> Yes</a>
<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> No
</button>
</div>
</div>
</div>
</div>
<p id="hesk-path" style="display: none"><?php echo HESK_PATH; ?></p>
</body>
</html>
Loading…
Cancel
Save