Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
26aeb193
Commit
26aeb193
authored
Aug 17, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: fixup scattered gettext() usage in the user manager
(cherry picked from commit
a52ec237
)
parent
3daed677
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
system_usermanager.php
src/www/system_usermanager.php
+4
-8
No files found.
src/www/system_usermanager.php
View file @
26aeb193
...
...
@@ -172,7 +172,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$userdeleted
=
$a_user
[
$id
][
'name'
];
unset
(
$a_user
[
$id
]);
write_config
();
$savemsg
=
gettext
(
"User"
)
.
"
{
$userdeleted
}
"
.
gettext
(
"successfully deleted"
);
$savemsg
=
sprintf
(
gettext
(
'The user "%s" was successfully removed.'
),
$userdeleted
);
header
(
"Location: system_usermanager.php?savemsg="
.
$savemsg
);
exit
;
}
...
...
@@ -182,8 +182,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$certdeleted
=
$certdeleted
[
'descr'
];
unset
(
$a_user
[
$id
][
'cert'
][
$pconfig
[
'certid'
]]);
write_config
();
$savemsg
=
gettext
(
"Certificate"
)
.
"
{
$certdeleted
}
"
.
gettext
(
"association removed."
);
$savemsg
=
sprintf
(
gettext
(
'The certificate association "%s" was successfully removed.'
),
$certdeleted
);
header
(
"Location: system_usermanager.php?savemsg="
.
$savemsg
.
"&act=edit&userid="
.
$id
);
exit
;
}
elseif
(
$act
==
"newApiKey"
&&
isset
(
$id
))
{
...
...
@@ -205,8 +204,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$authFactory
=
new
\OPNsense\Auth\AuthenticationFactory
();
$authenticator
=
$authFactory
->
get
(
"Local API"
);
$authenticator
->
dropKey
(
$username
,
$pconfig
[
'api_delete'
]);
$savemsg
=
gettext
(
"API key"
)
.
"
{
$pconfig
[
'api_delete'
]
}
"
.
gettext
(
"removed."
);
$savemsg
=
sprintf
(
gettext
(
'The API key "%s" was successfully removed.'
),
$pconfig
[
'api_delete'
]);
}
else
{
$savemsg
=
gettext
(
'No API key found'
);
}
...
...
@@ -221,9 +219,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$reqdfieldsn
=
array
(
gettext
(
"Username"
));
}
else
{
$reqdfields
=
explode
(
" "
,
"usernamefld passwordfld1"
);
$reqdfieldsn
=
array
(
gettext
(
"Username"
),
gettext
(
"Password"
));
$reqdfieldsn
=
array
(
gettext
(
"Username"
),
gettext
(
"Password"
));
}
do_input_validation
(
$pconfig
,
$reqdfields
,
$reqdfieldsn
,
$input_errors
);
...
...
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