Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nico
piphone-front
Commits
22833af1
Commit
22833af1
authored
Nov 24, 2014
by
Mindiell
Browse files
Suppression de l'attaque directe des retours de fonction, non utilisable en php < 5.4
parent
c6ab97d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Main.php
View file @
22833af1
...
...
@@ -8,7 +8,8 @@ class Main extends Controller {
function
home
(
$f3
,
$args
)
{
// Select a random contact
$rand_id
=
rand
(
0
,
count
(
$f3
->
get
(
'contacts'
))
-
1
);
$f3
->
set
(
'contact'
,
$f3
->
get
(
'contacts'
)[
$rand_id
]);
$contacts
=
$f3
->
get
(
'contacts'
);
$f3
->
set
(
'contact'
,
$contacts
[
$rand_id
]);
$f3
->
set
(
'block_content'
,
'home.html'
);
}
...
...
@@ -21,8 +22,8 @@ class Main extends Controller {
function
feedbackform
(
$f3
,
$args
)
{
//GET
if
(
$f3
->
get
(
'VERB'
)
==
'GET'
){
$categories
=
Api
::
get_feedback_categories
()
[
'categories'
]
;
$f3
->
set
(
'feedback_categories'
,
$categories
);
$categories
=
Api
::
get_feedback_categories
();
$f3
->
set
(
'feedback_categories'
,
$categories
[
'categories'
]
);
$contact_id
=
$f3
->
get
(
'POST.contact_id'
);
$f3
->
set
(
"contact_id"
,
$contact_id
);
...
...
@@ -73,7 +74,8 @@ class Main extends Controller {
}
function
contactslist
(
$f3
,
$args
)
{
$f3
->
set
(
'contacts'
,
Api
::
get_contacts
()[
'contacts'
]);
$contacts
=
Api
::
get_contacts
();
$f3
->
set
(
'contacts'
,
$contacts
);
$f3
->
set
(
'block_content'
,
'contactslist.html'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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