Commit fe61cdfb authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

tweak

parent 4d81e322
......@@ -663,8 +663,6 @@ class Form {
//use the cache
Yii::app()->session["forms"] = $allforms;
} else {
if(isset($_GET["form"]))
$params["formId"] = $_GET["form"];
......@@ -674,7 +672,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,[
......@@ -704,7 +702,7 @@ class Form {
}
}
if( $answer == null && count( $myAnswers ) > 1 && !$canEdit )
if( $answer == null && count( $myAnswers ) > 1 && !$params["canEdit"] )
$showForm = false;
//si aucune reponse existe
......
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