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
La Quadrature du Net
piphone
piphone-front
Commits
79ff389d
Commit
79ff389d
authored
Jan 31, 2017
by
okhin
Browse files
Adding the get_organization part
parent
48498245
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Api.php
View file @
79ff389d
...
...
@@ -65,6 +65,12 @@ class Api {
return
json_decode
(
$json
,
true
);
}
// Asking for organization details
statc
function
get_organization
()
{
$json
=
Api
::
get
(
"campaigns/"
.
CAMPAIGN_ID
.
"/organization"
);
return
json_decode
(
$json
,
true
);
}
// Posting a feedback
static
function
post_feedback
(
$contact_id
,
$comment
,
$feedback_category
=
''
)
{
$data
=
array
(
...
...
app/Controller.php
View file @
79ff389d
...
...
@@ -20,6 +20,8 @@ class Controller {
// Init campaign informations
$f3
->
set
(
'campaign'
,
Api
::
get_campaign
());
// Get organization informations
$f3
->
set
(
'organization'
,
Api
::
get_organization
());
// Init contacts list if needed
if
(
!
$f3
->
exists
(
'contacts'
))
{
$f3
->
set
(
'contacts'
,
Api
::
get_contacts
(),
API_TIMEOUT
);
...
...
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