Skip to content

Commit

Permalink
Merge branch 'feature/delete-an-exercise' of https://github.com/CPNV-…
Browse files Browse the repository at this point in the history
…ES/MAW11_Looper_GEJ into feature/delete-an-exercise
  • Loading branch information
Joumoune committed Oct 9, 2024
2 parents c59745e + 227d20c commit 58df013
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/exercise_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ function deleteExercise($id)
if ($exercise->getExerciseStatus() == Status::Building->value || $exercise->getExerciseStatus() == Status::Closed->value)
{
$exercise->delete();
}
}
header('Location: /exercises');
}
4 changes: 2 additions & 2 deletions src/models/databases_connectors/postgresql/postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public function modify(string $squery, array $args = [])
if ($args) {
$statement = $this->db->prepare($squery);
foreach ($args as $key => $value) {
$statement->bindParam( $key, $value);
$statement->bindParam($key, $value);
}
$statement->execute();
} else {
$this->db->exec($squery);
}

return;
}
}

0 comments on commit 58df013

Please sign in to comment.