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
31293e66
Commit
31293e66
authored
Oct 14, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: purge $changecount for #394
parent
456bb54e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
54 deletions
+23
-54
guiconfig.inc
src/www/guiconfig.inc
+2
-4
load_balancer_monitor_edit.php
src/www/load_balancer_monitor_edit.php
+5
-10
load_balancer_pool_edit.php
src/www/load_balancer_pool_edit.php
+4
-10
load_balancer_relay_action_edit.php
src/www/load_balancer_relay_action_edit.php
+3
-8
load_balancer_relay_protocol_edit.php
src/www/load_balancer_relay_protocol_edit.php
+4
-14
load_balancer_virtual_server_edit.php
src/www/load_balancer_virtual_server_edit.php
+5
-8
No files found.
src/www/guiconfig.inc
View file @
31293e66
...
...
@@ -338,13 +338,11 @@ function gentitle($title) {
return
join
(
$navlevelsep
,
$title
);
}
/* update the changedesc and changecount(er) variables */
function
update_changedesc
(
$update
)
{
function
update_changedesc
(
$update
)
{
global
$changedesc
;
global
$changecount
;
$changedesc
.=
"
{
$update
}
"
;
$changecount
++
;
}
function
clear_log
(
$logfile
,
$restart_syslogd
=
true
)
...
...
src/www/load_balancer_monitor_edit.php
View file @
31293e66
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
...
...
@@ -127,11 +128,8 @@ if (isset($id) && $a_monitor[$id]) {
}
$changedesc
=
gettext
(
"Load Balancer: Monitor:"
)
.
" "
;
$changecount
=
0
;
if
(
$_POST
)
{
$changecount
++
;
unset
(
$input_errors
);
$pconfig
=
$_POST
;
...
...
@@ -239,15 +237,12 @@ if ($_POST) {
$config
[
'load_balancer'
][
'lbpool'
][
$i
][
'monitor'
]
=
$monent
[
'name'
];
}
$a_monitor
[
$id
]
=
$monent
;
}
else
}
else
{
$a_monitor
[]
=
$monent
;
if
(
$changecount
>
0
)
{
/* Mark config dirty */
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
}
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
header
(
"Location: load_balancer_monitor.php"
);
exit
;
}
...
...
src/www/load_balancer_pool_edit.php
View file @
31293e66
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
...
...
@@ -55,11 +55,8 @@ if (isset($id) && $a_pool[$id]) {
}
$changedesc
=
gettext
(
"Load Balancer: Pool:"
)
.
" "
;
$changecount
=
0
;
if
(
$_POST
)
{
$changecount
++
;
unset
(
$input_errors
);
$pconfig
=
$_POST
;
...
...
@@ -140,15 +137,12 @@ if ($_POST) {
$config
[
'load_balancer'
][
'virtual_server'
][
$i
][
'lbpool'
]
=
$poolent
[
'name'
];
}
$a_pool
[
$id
]
=
$poolent
;
}
else
}
else
{
$a_pool
[]
=
$poolent
;
if
(
$changecount
>
0
)
{
/* Mark pool dirty */
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
}
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
header
(
"Location: load_balancer_pool.php"
);
exit
;
}
...
...
src/www/load_balancer_relay_action_edit.php
View file @
31293e66
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
...
...
@@ -54,7 +55,6 @@ if (isset($id) && $a_action[$id]) {
}
$changedesc
=
gettext
(
"Load Balancer: Relay Action:"
)
.
" "
;
$changecount
=
0
;
$kv
=
array
(
'key'
,
'value'
);
$vk
=
array
(
'value'
,
'key'
);
...
...
@@ -92,8 +92,6 @@ $actions['direction']['response']['header'] = $hr_actions;
if
(
$_POST
)
{
$changecount
++
;
unset
(
$input_errors
);
$pconfig
=
$_POST
;
...
...
@@ -157,12 +155,9 @@ if ($_POST) {
}
else
{
$a_action
[]
=
$actent
;
}
if
(
$changecount
>
0
)
{
/* Mark config dirty */
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
}
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
header
(
"Location: load_balancer_relay_action.php"
);
exit
;
}
...
...
src/www/load_balancer_relay_protocol_edit.php
View file @
31293e66
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
...
...
@@ -26,11 +27,9 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"services.inc"
);
$referer
=
(
isset
(
$_SERVER
[
'HTTP_REFERER'
])
?
$_SERVER
[
'HTTP_REFERER'
]
:
'/load_balancer_relay_protocol.php'
);
if
(
!
is_array
(
$config
[
'load_balancer'
][
'lbprotocol'
]))
{
...
...
@@ -55,13 +54,8 @@ if (isset($id) && $a_protocol[$id]) {
}
$changedesc
=
gettext
(
"Load Balancer: Relay Protocol:"
)
.
" "
;
$changecount
=
0
;
if
(
$_POST
)
{
$changecount
++
;
unset
(
$input_errors
);
$pconfig
=
$_POST
;
...
...
@@ -113,14 +107,10 @@ if ($_POST) {
$a_protocol
[
$id
]
=
$protent
;
}
else
{
$a_protocol
[]
=
$protent
;
}
if
(
$changecount
>
0
)
{
/* Mark config dirty */
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
}
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
header
(
"Location: load_balancer_relay_protocol.php"
);
exit
;
}
...
...
src/www/load_balancer_virtual_server_edit.php
View file @
31293e66
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
...
...
@@ -52,7 +53,6 @@ if (isset($id) && $a_vs[$id]) {
}
$changedesc
=
gettext
(
"Load Balancer: Virtual Server:"
)
.
" "
;
$changecount
=
0
;
if
(
$_POST
)
{
unset
(
$input_errors
);
...
...
@@ -119,15 +119,12 @@ if ($_POST) {
cleanup_lb_mark_anchor
(
$a_vs
[
$id
][
'name'
]);
}
$a_vs
[
$id
]
=
$vsent
;
}
else
}
else
{
$a_vs
[]
=
$vsent
;
if
(
$changecount
>
0
)
{
/* Mark virtual server dirty */
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
}
mark_subsystem_dirty
(
'loadbalancer'
);
write_config
(
$changedesc
);
header
(
"Location: load_balancer_virtual_server.php"
);
exit
;
}
...
...
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