summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/pages/builds/delete.php5
-rw-r--r--frontend/pages/logout.php1
-rw-r--r--frontend/routing.csv1
3 files changed, 4 insertions, 3 deletions
diff --git a/frontend/pages/builds/delete.php b/frontend/pages/builds/delete.php
index 6fc6ae3..b92d28b 100644
--- a/frontend/pages/builds/delete.php
+++ b/frontend/pages/builds/delete.php
@@ -13,11 +13,9 @@ function body_builds_delete(&$S) {
case 'queued':
if (isset($S['build']->backend))
die(print_warning('Oops', 'You tried to delete this build just as it was about to start being built. Please try to cancel it in a moment.'));
- case 'upload_failed':
case 'canceled':
- case 'failed':
+ case 'queued':
case 'complete':
- case 'got_signal':
$S['build']->delete();
echo print_success('Build deleted.');
break;
@@ -27,6 +25,7 @@ function body_builds_delete(&$S) {
case 'uploading':
case 'building':
default:
+ $S['build']->failed='false'; // Otherwise doesn't get noticed by backend
$S['build']->status='cancel';
$S['build']->write();
echo print_success('Build queued for cancellation.');
diff --git a/frontend/pages/logout.php b/frontend/pages/logout.php
index 71f8c11..a60ee2d 100644
--- a/frontend/pages/logout.php
+++ b/frontend/pages/logout.php
@@ -4,6 +4,7 @@ function init_logout(&$S) {
$S['session']->delete();
}
setcookie($S['conf']['cookiename'], '', 1, $S['cookie_dir'], '', false, true);
+ unset($S['user']);
if (isset($_REQUEST['go'])) {
header('Location: '.url($_REQUEST['go']));
}
diff --git a/frontend/routing.csv b/frontend/routing.csv
index 3151d27..7183a43 100644
--- a/frontend/routing.csv
+++ b/frontend/routing.csv
@@ -19,6 +19,7 @@ build/([a-z0-9]{6})/([0-9]+)/([0-9]+) builds/task build task page
build/([a-zA-Z0-9]{6})/download builds/download build
build/([a-zA-Z0-9]{6})/history builds/history build
build/([a-zA-Z0-9]{6})/delete builds/delete build
+build/([a-zA-Z0-9]{6})/cancel builds/delete build
#build/([a-z0-9]{6})/live builds/live build
# Configurations
create configurations/wizard