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
fe61cdfb
Commit
fe61cdfb
authored
Mar 04, 2020
by
Tibor Katelbach
Browse files
tweak
parent
4d81e322
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/Form.php
View file @
fe61cdfb
...
...
@@ -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
...
...
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