Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
survey
Commits
8cf35477
Commit
8cf35477
authored
Mar 04, 2020
by
Anatole Rakotoson
Browse files
Merge remote-tracking branch 'origin/qa' into qa
parents
17c78137
fe61cdfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/Form.php
View file @
8cf35477
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment