Commit 8b05c0e8 authored by GROSS-AMBLARD David's avatar GROSS-AMBLARD David
Browse files

Death to die

No more die() or exit() except in forum managment for later investigation
everything should be caught by the global try...catch
parent 0e00f89e
......@@ -86,16 +86,16 @@ function executeSqlFile($file_name, $conn){
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) {
$query .= $sql_line;
if (substr(rtrim($query), -1) == ';') {
try {
// try {
debug("query from init-workflow");
debug($query);
$conn->query($query);
} catch (PDOException $e) {
echo "<p>Headache ! <pre>$e</pre></p>";
echo $query."<br/>";
print_r($conn->errorInfo());
exit;
}
// } catch (PDOException $e) {
// echo "<p>Headache ! <pre>$e</pre></p>";
// echo $query."<br/>";
// print_r($conn->errorInfo());
// exit;
// }
$query = "";
}
}
......@@ -210,10 +210,10 @@ function insertAnswer($conn, $id, $artifactid, $value, $mass, $isAjax=false, $he
$stmt->bindParam(':user', $user, PDO::PARAM_INT);
$stmt->bindParam(':artifact', $artifact, PDO::PARAM_STR);
$stmt->execute() or die(mysql_error());
$stmt->execute(); // or die(mysql_error());
// indicated that the task has been answered
$conn->query("insert into Answered(id,artifact) values ($id,$artifact)") or die();
$conn->query("insert into Answered(id,artifact) values ($id,$artifact)"); // or die();
update($conn, $artifact);
......@@ -264,8 +264,7 @@ function submitFeedback($conn, $page, $feedbackText)
":iduser" => $user,
":page" => $page,
":text" => $feedbackText
)) or die(mysql_error());
debug("feedback saved");
)); // or die(mysql_error());
}
/**
......@@ -283,7 +282,7 @@ function insertTaskFeedback($conn, $idtask, $feedbackText, $targetTable)
"idtask" => $idtask,
"text" => $feedbackText,
"iduser" => $user
)) or die(mysql_error());
));// or die(mysql_error());
}
/**
......@@ -360,7 +359,7 @@ function DEPRECATEDchooseArtifactH($conn, $id, $artifact)
$stmt->bindParam(':id', $id, PDO::PARAM_STR);
$stmt->bindParam(':name', $_SESSION['tablename'], PDO::PARAM_STR);
$stmt->bindParam(':user', $_SESSION['id'], PDO::PARAM_INT);
$stmt->execute() or die(mysql_error());
$stmt->execute(); // or die(mysql_error());
$_SESSION['artifact_active'] = $id;
......
......@@ -429,7 +429,7 @@ function initializeUserProjectArtifact($conn, $user, $project)
$stmt->bindParam(':state', $state, PDO::PARAM_STR);
$stmt->bindParam(':node', $node, PDO::PARAM_INT);
$stmt->bindParam(':attributes', $attributes, PDO::PARAM_INT);
$stmt->execute() or die(mysql_error());
$stmt->execute();// or die(mysql_error());
} else {}
}
}
......@@ -798,7 +798,7 @@ function chooseActivityProject($conn, $id)
$stmt->bindParam(':id', $_SESSION['artifact_active'], PDO::PARAM_STR);
$stmt->bindParam(':name', $_SESSION['tablename'], PDO::PARAM_STR);
$stmt->bindParam(':user', $_SESSION['id'], PDO::PARAM_INT);
$stmt->execute() or die(mysql_error());
$stmt->execute();// or die(mysql_error());
$_SESSION['artifactclass_active'] = $id;
......
......@@ -9,8 +9,9 @@ pre {
}
/* Class for the $VIEW['MAIN'] content */
.HWmain {
margin-top:50px;
margin-top:50px; /* avoid toplevel menu override */
}
h1{
/* text-align: center; */
......
......@@ -55,7 +55,7 @@
<!-- no-repeat bottom right/20% url('projects/headwork/background.jpg'); background-color: rgb(197,205,66);"> -->
<!-- <body> -->
<nav class="navbar fixed-top navbar-dark justify-content-between bg-dark" style="background-color: black;">
<nav class="navbar fixed-top navbar-dark justify-content-between bg-dark flex-sm-row flex-column" style="background-color: black;">
<!-- Navbar content -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment