Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
helpdesk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web2project
helpdesk
Commits
e080cc5a
Commit
e080cc5a
authored
Jan 20, 2016
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add loadConfig() function to load configuration.
parent
b03f6a9e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
14 deletions
+23
-14
configure.php
configure.php
+2
-12
helpdesk.functions.php
helpdesk.functions.php
+20
-1
setup.php
setup.php
+1
-1
No files found.
configure.php
View file @
e080cc5a
...
@@ -15,17 +15,7 @@ if (!canView('system')) {
...
@@ -15,17 +15,7 @@ if (!canView('system')) {
@
include_once
(
"./functions/admin_func.php"
);
@
include_once
(
"./functions/admin_func.php"
);
$HELPDESK_CONFIG
=
array
();
$HELPDESK_CONFIG
=
array
();
$q
=
new
w2p_Database_Query
;
$HELPDESK_CONFIG
=
loadConfiguration
();
// Read values from table
$q
->
addQuery
(
'*'
);
$q
->
addTable
(
'helpdesk_config'
);
if
(
!
$q
->
exec
())
{
$AppUI
->
setMsg
(
db_error
(),
UI_MSG_ERROR
);
}
while
(
$row
=
$q
->
fetchRow
())
{
$HELPDESK_CONFIG
[
$row
[
'helpdesk_config'
]]
=
$row
[
'helpdesk_value'
];
}
$q
->
clear
();
// get a list of permitted companies
// get a list of permitted companies
$company
=
new
CCompany
();
$company
=
new
CCompany
();
...
@@ -221,7 +211,7 @@ $config_options = array(
...
@@ -221,7 +211,7 @@ $config_options = array(
'buttons'
=>
array
(
1
=>
$AppUI
->
_
(
'Always'
),
'buttons'
=>
array
(
1
=>
$AppUI
->
_
(
'Always'
),
0
=>
$AppUI
->
_
(
'Status change'
))
0
=>
$AppUI
->
_
(
'Status change'
))
),
),
"noti
t
y_email_address"
=>
array
(
"noti
f
y_email_address"
=>
array
(
"description"
=>
$AppUI
->
_
(
'New unassigned items notification address'
),
"description"
=>
$AppUI
->
_
(
'New unassigned items notification address'
),
"value"
=>
'support@yourcompany.com'
,
"value"
=>
'support@yourcompany.com'
,
'type'
=>
'text'
'type'
=>
'text'
...
...
helpdesk.functions.php
View file @
e080cc5a
...
@@ -3,7 +3,26 @@ if (!defined('W2P_BASE_DIR')) {
...
@@ -3,7 +3,26 @@ if (!defined('W2P_BASE_DIR')) {
die
(
'You should not access this file directly'
);
die
(
'You should not access this file directly'
);
}
}
include_once
'config.php'
;
$HELDPDESK_CONFIG
=
loadConfig
();
function
loadConfig
()
{
$config
=
array
();
// Read values from table
$q
=
new
w2p_Database_Query
;
$q
->
addQuery
(
'*'
);
$q
->
addTable
(
'helpdesk_config'
);
if
(
!
$q
->
exec
())
{
$AppUI
->
setMsg
(
db_error
(),
UI_MSG_ERROR
);
return
null
;
}
while
(
$row
=
$q
->
fetchRow
())
{
$config
[
$row
[
'helpdesk_config'
]]
=
$row
[
'helpdesk_value'
];
}
$q
->
clear
();
return
$config
;
}
function
getAllowedUsers
(
$companyid
=
0
,
$activeOnly
=
0
)
function
getAllowedUsers
(
$companyid
=
0
,
$activeOnly
=
0
)
{
{
...
...
setup.php
View file @
e080cc5a
...
@@ -430,7 +430,7 @@ class CSetupHelpDesk extends w2p_System_Setup
...
@@ -430,7 +430,7 @@ class CSetupHelpDesk extends w2p_System_Setup
$q
->
addInsert
(
'helpdesk_value'
,
'1'
);
$q
->
addInsert
(
'helpdesk_value'
,
'1'
);
$q
->
addInsert
(
'helpdesk_config'
,
'task_requestor_notification'
);
$q
->
addInsert
(
'helpdesk_config'
,
'task_requestor_notification'
);
$q
->
addInsert
(
'helpdesk_value'
,
'1'
);
$q
->
addInsert
(
'helpdesk_value'
,
'1'
);
$q
->
addInsert
(
'helpdesk_config'
,
'noti
t
y_email_address'
);
$q
->
addInsert
(
'helpdesk_config'
,
'noti
f
y_email_address'
);
$q
->
addInsert
(
'helpdesk_value'
,
'support@yourcomapany.com'
);
$q
->
addInsert
(
'helpdesk_value'
,
'support@yourcomapany.com'
);
$q
->
addInsert
(
'helpdesk_config'
,
'email_subject'
);
$q
->
addInsert
(
'helpdesk_config'
,
'email_subject'
);
$q
->
addInsert
(
'helpdesk_value'
,
'Your Company registered your recent request'
);
$q
->
addInsert
(
'helpdesk_value'
,
'Your Company registered your recent request'
);
...
...
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