Project

General

Profile

« Previous | Next » 

Revision 6c07db48

Added by Phil Davis about 10 years ago

Code spacing

and other random stuff I noticed.
I think this finishes messing with code style. The codebase should match
the developer style guide closely enough that 99.9% of changes will not
feel the need to also massage the formatting.

View differences:

usr/local/www/vpn_l2tp.php
72 72
	/* input validation */
73 73
	if ($_POST['mode'] == "server") {
74 74
		$reqdfields = explode(" ", "localip remoteip");
75
		$reqdfieldsn = array(gettext("Server address"),gettext("Remote start address"));
75
		$reqdfieldsn = array(gettext("Server address"), gettext("Remote start address"));
76 76

  
77 77
		if ($_POST['radiusenable']) {
78 78
			$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
......
144 144

  
145 145

  
146 146
		if ($_POST['l2tp_dns1'] == "") {
147
			if (isset($l2tpcfg['dns1']))
147
			if (isset($l2tpcfg['dns1'])) {
148 148
				unset($l2tpcfg['dns1']);
149
			} else {
150
				$l2tpcfg['dns1'] = $_POST['l2tp_dns1'];
151 149
			}
150
		} else {
151
			$l2tpcfg['dns1'] = $_POST['l2tp_dns1'];
152
		}
152 153

  
153
			if ($_POST['l2tp_dns2'] == "") {
154
				if (isset($l2tpcfg['dns2'])) {
155
					unset($l2tpcfg['dns2']);
156
				}
157
			} else {
158
				$l2tpcfg['dns2'] = $_POST['l2tp_dns2'];
154
		if ($_POST['l2tp_dns2'] == "") {
155
			if (isset($l2tpcfg['dns2'])) {
156
				unset($l2tpcfg['dns2']);
159 157
			}
158
		} else {
159
			$l2tpcfg['dns2'] = $_POST['l2tp_dns2'];
160
		}
160 161

  
161 162
		if ($_POST['radiusenable'] == "yes") {
162 163
			$l2tpcfg['radius']['enable'] = true;
......
197 198

  
198 199
<script type="text/javascript">
199 200
//<![CDATA[
200
function get_radio_value(obj)
201
{
201
function get_radio_value(obj) {
202 202
	for (i = 0; i < obj.length; i++) {
203 203
		if (obj[i].checked) {
204 204
			return obj[i].value;
......
358 358
						<td width="78%" class="vtable">
359 359
							<select id="l2tp_subnet" name="l2tp_subnet">
360 360
							<?php
361
								for ($x=0; $x<33; $x++) {
361
								for ($x = 0; $x < 33; $x++) {
362 362
									if ($x == $pconfig['l2tp_subnet']) {
363 363
										$SELECTED = " selected=\"selected\"";
364 364
									} else {
......
376 376
						<td width="78%" class="vtable">
377 377
							<select id="n_l2tp_units" name="n_l2tp_units">
378 378
							<?php
379
								for ($x=0; $x<255; $x++) {
379
								for ($x = 0; $x < 255; $x++) {
380 380
									if ($x == $pconfig['n_l2tp_units']) {
381 381
										$SELECTED = " selected=\"selected\"";
382 382
									} else {

Also available in: Unified diff