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

Empty the log file at restart

parent 8b39f52f
......@@ -31,7 +31,7 @@
}
// logfile output
$handle = fopen(LOGFILENAME, "a+") or die('Cannot open log file '.LOGFILENAME);
fwrite($handle, date("r")." $msg\n");
fwrite($handle, date("r").":$msg\n");
fflush($handle);
}
......
......@@ -430,7 +430,6 @@ EOT;
*/
function insertAnswer($conn, $id, $artifactid, $value, $mass, $isAjax=false, $help=false, $typeanswer=0)
{
debug("called");
$user=$_SESSION['id'];
$stmt = $conn->query("select * from Task where id=$id and artifact=$artifactid");
......@@ -552,6 +551,7 @@ function insertAnswer($conn, $id, $artifactid, $value, $mass, $isAjax=false, $he
*/
function insertJsonAnswer($conn, $id, $activity_id,$answer,$mass){
debug("json argument:".$answer);
$typeanswer=0;
$ajax = (isset($_POST['ajax']) and $_POST['ajax'] == true) ? true : false;
......
......@@ -59,6 +59,9 @@ function initialize($conn)
*/
function restart($conn)
{
// empty the log file
file_put_contents('log/log.txt', '');
// empty the database
executeSqlFile('script/init-db-schema.sql', $conn);
}
......
......@@ -4,12 +4,6 @@ Thanks. In the meantime, four other participants have given their opinion. Here
</p>
<p>
<center>
<table border>
<tr><td>LeopardAddict</td><td>2</td></tr>
<tr><td>EverestForEver</td><td>2</td></tr>
<tr><td>Anonimal5</td><td>1</td></tr>
<tr><td>Sagarman</td><td>2</td></tr>
</table>
TAG2
</center>
</p>
......
Markdown is supported
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