Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
piphone-front
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
piphone
piphone-front
Commits
79ff389d
Commit
79ff389d
authored
Jan 31, 2017
by
okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the get_organization part
parent
48498245
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
app/Api.php
app/Api.php
+6
-0
app/Controller.php
app/Controller.php
+2
-0
No files found.
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
Markdown
is supported
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