Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Spencer
wiaflos
Commits
976f7523
Commit
976f7523
authored
Dec 03, 2016
by
Nigel Kukard
Browse files
Merge branch 'nkupdates3' into 'master'
Load template configuration with local admin access See merge request
!25
parents
b36a02e0
1387839c
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiaflos/client/cmdline.pm
View file @
976f7523
...
...
@@ -322,6 +322,24 @@ sub cmd_connect
my
$server
=
wiaflos::client::
fakeserver
->
new
();
$server
->
{'
inifile
'}
=
\
%config
;
# Template engine config
my
@template_params
=
(
'
path
',
'
debug
',
'
global_header
',
'
global_footer
',
);
my
$templates
;
foreach
my
$param
(
@template_params
)
{
$templates
->
{
$param
}
=
$config
{'
templates
'}{
$param
}
if
(
defined
(
$config
{'
templates
'}{
$param
}));
}
if
(
!
defined
(
$templates
->
{'
path
'}))
{
print
(
STDERR
"
ERROR: Under 'templates' section, required parameter 'path' not found
");
exit
1
;
}
$server
->
{'
template_config
'}
=
$templates
;
# Init authentication
wiaflos::server::api::auth::
init
(
$server
);
# Init config
...
...
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