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
6482172a
Commit
6482172a
authored
Jul 06, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inc: merge duplicated code into get_zoneinfo() for #242
parent
3e3d6913
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
system.inc
src/etc/inc/system.inc
+9
-4
system_general.php
src/www/system_general.php
+1
-4
wizard.php
src/www/wizard.php
+1
-6
No files found.
src/etc/inc/system.inc
View file @
6482172a
...
...
@@ -187,6 +187,14 @@ function get_country_codes()
return
$dn_cc
;
}
function
get_zoneinfo
()
{
return
array_map
(
function
(
$path
)
{
return
str_replace
(
'/usr/share/zoneinfo/'
,
''
,
$path
);
},
glob
(
'/usr/share/zoneinfo/*/*'
)
);
}
function
get_searchdomains
()
{
global
$config
;
...
...
@@ -1229,10 +1237,7 @@ function system_timezone_configure()
/* extract appropriate timezone file */
$timezone
=
$syscfg
[
'timezone'
];
$timezones
=
array_map
(
function
(
$path
)
{
return
str_replace
(
'/usr/share/zoneinfo/'
,
''
,
$path
);
},
glob
(
'/usr/share/zoneinfo/*/*'
)
);
$timezones
=
get_zoneinfo
();
// Reset to default if empty or not existend
if
(
empty
(
$timezone
)
||
!
in_array
(
$timezone
,
$timezones
))
{
...
...
src/www/system_general.php
View file @
6482172a
...
...
@@ -79,10 +79,7 @@ if ($pconfig['timezone'] <> $_POST['timezone']) {
filter_pflog_start
();
}
$timezonelist
=
array_map
(
function
(
$path
)
{
return
str_replace
(
'/usr/share/zoneinfo/'
,
''
,
$path
);
},
glob
(
'/usr/share/zoneinfo/*/*'
)
);
$timezonelist
=
get_zoneinfo
();
$multiwan
=
false
;
$interfaces
=
get_configured_interface_list
();
...
...
src/www/wizard.php
View file @
6482172a
...
...
@@ -678,12 +678,7 @@ function showchange() {
break
;
case
"timezone_select"
:
$timezonelist
=
array_map
(
function
(
$path
)
{
return
str_replace
(
'/usr/share/zoneinfo/'
,
''
,
$path
);
},
glob
(
'/usr/share/zoneinfo/*/*'
)
);
$timezonelist
=
get_zoneinfo
();
if
(
$field
[
'displayname'
])
{
echo
"<td width=
\"
22%
\"
align=
\"
right
\"
class=
\"
vncellreq
\"
>
\n
"
;
...
...
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