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
32d82fd5
Commit
32d82fd5
authored
Jan 22, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) spacing legacy.inc
parent
1bf660a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
82 deletions
+75
-82
legacy.inc
src/etc/inc/xmlrpc/legacy.inc
+75
-82
No files found.
src/etc/inc/xmlrpc/legacy.inc
View file @
32d82fd5
...
@@ -39,7 +39,6 @@ function xmlrpc_publishable_legacy()
...
@@ -39,7 +39,6 @@ function xmlrpc_publishable_legacy()
'firmware_version_xmlrpc'
,
'reboot_xmlrpc'
,
'get_notices_xmlrpc'
'firmware_version_xmlrpc'
,
'reboot_xmlrpc'
,
'get_notices_xmlrpc'
);
);
return
$publish
;
return
$publish
;
}
}
...
@@ -50,9 +49,9 @@ function xmlrpc_publishable_legacy()
...
@@ -50,9 +49,9 @@ function xmlrpc_publishable_legacy()
function
does_vip_exist
(
$vip
)
{
function
does_vip_exist
(
$vip
)
{
global
$config
;
global
$config
;
if
(
!
$vip
)
if
(
!
$vip
)
{
return
false
;
return
false
;
}
switch
(
$vip
[
'mode'
])
{
switch
(
$vip
[
'mode'
])
{
case
"carp"
:
case
"carp"
:
...
@@ -71,9 +70,10 @@ function does_vip_exist($vip) {
...
@@ -71,9 +70,10 @@ function does_vip_exist($vip) {
$ifacedata
=
pfSense_getall_interface_addresses
(
$realif
);
$ifacedata
=
pfSense_getall_interface_addresses
(
$realif
);
foreach
(
$ifacedata
as
$vipips
)
{
foreach
(
$ifacedata
as
$vipips
)
{
if
(
$vipips
==
"
{
$vip
[
'subnet'
]
}
/
{
$vip
[
'subnet_bits'
]
}
"
)
if
(
$vipips
==
"
{
$vip
[
'subnet'
]
}
/
{
$vip
[
'subnet_bits'
]
}
"
)
{
return
true
;
return
true
;
}
}
}
return
false
;
return
false
;
}
}
...
@@ -83,7 +83,6 @@ function does_vip_exist($vip) {
...
@@ -83,7 +83,6 @@ function does_vip_exist($vip) {
http://www.php.net/manual/en/function.array-merge-recursive.php#73843
http://www.php.net/manual/en/function.array-merge-recursive.php#73843
*/
*/
function
array_merge_recursive_unique
(
$array0
,
$array1
)
{
function
array_merge_recursive_unique
(
$array0
,
$array1
)
{
$arrays
=
func_get_args
();
$arrays
=
func_get_args
();
$remains
=
$arrays
;
$remains
=
$arrays
;
...
@@ -93,11 +92,9 @@ function array_merge_recursive_unique($array0, $array1) {
...
@@ -93,11 +92,9 @@ function array_merge_recursive_unique($array0, $array1) {
// loop available array
// loop available array
foreach
(
$arrays
as
$array
)
{
foreach
(
$arrays
as
$array
)
{
// The first remaining array is $array. We are processing it. So
// The first remaining array is $array. We are processing it. So
// we remove it from remaing arrays.
// we remove it from remaing arrays.
array_shift
(
$remains
);
array_shift
(
$remains
);
// We don't care non array param, like array_merge since PHP 5.0.
// We don't care non array param, like array_merge since PHP 5.0.
if
(
is_array
(
$array
))
{
if
(
is_array
(
$array
))
{
// Loop values
// Loop values
...
@@ -146,7 +143,6 @@ function get_notices_xmlrpc($category = null)
...
@@ -146,7 +143,6 @@ function get_notices_xmlrpc($category = null)
}
else
{
}
else
{
return
get_notices
(
$category
);
return
get_notices
(
$category
);
}
}
}
}
/**
/**
...
@@ -156,7 +152,6 @@ function get_notices_xmlrpc($category = null)
...
@@ -156,7 +152,6 @@ function get_notices_xmlrpc($category = null)
function
reboot_xmlrpc
()
function
reboot_xmlrpc
()
{
{
mwexec_bg
(
"/usr/local/etc/rc.reboot"
);
mwexec_bg
(
"/usr/local/etc/rc.reboot"
);
return
true
;
return
true
;
}
}
...
@@ -167,7 +162,6 @@ function reboot_xmlrpc()
...
@@ -167,7 +162,6 @@ function reboot_xmlrpc()
function
firmware_version_xmlrpc
()
function
firmware_version_xmlrpc
()
{
{
require_once
(
"pfsense-utils.inc"
);
require_once
(
"pfsense-utils.inc"
);
return
host_firmware_version
();
return
host_firmware_version
();
}
}
...
@@ -354,7 +348,6 @@ function restore_config_section_xmlrpc($new_config)
...
@@ -354,7 +348,6 @@ function restore_config_section_xmlrpc($new_config)
vpn_ipsec_configure
();
vpn_ipsec_configure
();
}
}
unset
(
$old_config
);
unset
(
$old_config
);
return
true
;
return
true
;
...
...
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