Ejemplo n.º 1
0
 /**
  * Delete a build.
  */
 public function delete($buildId)
 {
     if (empty($_SESSION['user']) || !$_SESSION['user']->getIsAdmin()) {
         throw new \Exception('You do not have permission to do that.');
     }
     $build = BuildFactory::getBuildById($buildId);
     if (empty($build)) {
         throw new NotFoundException('Build with ID: ' . $buildId . ' does not exist.');
     }
     $this->buildStore->delete($build);
     header('Location: ' . PHPCI_URL . 'project/view/' . $build->getProjectId());
     exit;
 }
Ejemplo n.º 2
0
 /**
  * Delete a given build.
  * @param Build $build
  * @return bool
  */
 public function deleteBuild(Build $build)
 {
     $build->removeBuildDirectory();
     return $this->buildStore->delete($build);
 }
Ejemplo n.º 3
0
 /**
  * Delete a given build.
  * @param Build $build
  * @return bool
  */
 public function deleteBuild(Build $build)
 {
     return $this->buildStore->delete($build);
 }