From 6421f1428ec55e9fd7aab2b4029d51c805dc5083 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Tue, 29 Jul 2014 15:07:26 +0100 Subject: [PATCH] Fixing incorrect method call BuildService::delete() and making the project page reload when a build is deleted. Fixes #528 --- PHPCI/Controller/BuildController.php | 2 +- public/assets/js/init.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PHPCI/Controller/BuildController.php b/PHPCI/Controller/BuildController.php index 600c8508..fb9957cb 100644 --- a/PHPCI/Controller/BuildController.php +++ b/PHPCI/Controller/BuildController.php @@ -151,7 +151,7 @@ class BuildController extends \PHPCI\Controller throw new NotFoundException('Build with ID: ' . $buildId . ' does not exist.'); } - $this->buildService->delete($build); + $this->buildService->deleteBuild($build); header('Location: '.PHPCI_URL.'project/view/' . $build->getProjectId()); exit; diff --git a/public/assets/js/init.js b/public/assets/js/init.js index c851f648..0ef49c4f 100644 --- a/public/assets/js/init.js +++ b/public/assets/js/init.js @@ -20,7 +20,7 @@ function bindAppDeleteEvents () { e.preventDefault(); confirmDelete(e.target.href, 'Build').onClose = function () { - refreshBuildsTable(); + window.location.reload(); }; return false;