Commit 8cf35477 authored by Anatole Rakotoson's avatar Anatole Rakotoson
Browse files

Merge remote-tracking branch 'origin/qa' into qa

parents 17c78137 fe61cdfb
......@@ -667,8 +667,6 @@ class Form {
//use the cache
Yii::app()->session["forms"] = $allforms;
} else {
if(isset($_GET["form"]))
$params["formId"] = $_GET["form"];
......@@ -678,7 +676,7 @@ class Form {
// $answer = ( isset(Yii::app()->session["costum"]["form"]["canModifyAnswer"]) && isset($_GET['answer'])) ? PHDB::findOne( Form::ANSWER_COLLECTION,[ "_id" => new MongoId($_GET['answer']) ] ) : null;
$answer = ( isset($_GET['answer'])) ? PHDB::findOne( Form::ANSWER_COLLECTION,[ "_id" => new MongoId($_GET['answer']) ] ) : null;
$answer = ( isset($_GET['answer']) && $_GET['answer'] != "new") ? PHDB::findOne( Form::ANSWER_COLLECTION,[ "_id" => new MongoId($_GET['answer']) ] ) : null;
$showForm = true;
$generateAnswer = false;
$myAnswers = PHDB::find( Form::ANSWER_COLLECTION,[
......@@ -708,7 +706,7 @@ class Form {
}
}
if( $answer == null && count( $myAnswers ) > 1 && !$canEdit )
if( $answer == null && count( $myAnswers ) > 1 && !$params["canEdit"] )
$showForm = false;
//si aucune reponse existe
......
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