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
1387839c
Commit
1387839c
authored
Dec 03, 2016
by
Nigel Kukard
Browse files
Load template configuration with local admin access
parent
d98f0e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiaflos/client/cmdline.pm
View file @
1387839c
...
...
@@ -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