Project

General

Profile

« Previous | Next » 

Revision e41468cf

Added by Chris Buechler about 9 years ago

Fix style

View differences:

src/usr/local/www/diag_dump_states.php
224 224
	/* RuleId filter. */
225 225
	if (isset($_REQUEST['ruleid'])) {
226 226
		$ids = explode(",", $_REQUEST['ruleid']);
227
		for ($i = 0; $i < count($ids); $i++)
227
		for ($i = 0; $i < count($ids); $i++) {
228 228
			$arr[] = array("ruleid" => intval($ids[$i]));
229
		}
229 230
	}
230 231

  
231 232
	/* Interface filter. */
232
	if (isset($_POST['interface']) && $_POST['interface'] != "all")
233
	if (isset($_POST['interface']) && $_POST['interface'] != "all") {
233 234
		$arr[] = array("interface" => get_real_interface($_POST['interface']));
235
	}
234 236

  
235
	if (isset($_POST['filter']) && strlen($_POST['filter']) > 0)
237
	if (isset($_POST['filter']) && strlen($_POST['filter']) > 0) {
236 238
		$arr[] = array("filter" => $_POST['filter']);
239
	}
237 240

  
238
	if (count($arr) > 0)
241
	if (count($arr) > 0) {
239 242
		$res = pfSense_get_pf_states($arr);
240
	else
243
	} else {
241 244
		$res = pfSense_get_pf_states();
245
	}
242 246

  
243 247
	$states = 0;
244
	if ($res != NULL && is_array($res))
248
	if ($res != NULL && is_array($res)) {
245 249
		$states = count($res);
250
	}
246 251

  
247 252
	/* XXX - limit to 10.000 states. */
248
	if ($states > 10000)
253
	if ($states > 10000) {
249 254
		$states = 10000;
255
	}
250 256

  
251 257
	for ($i = 0; $i < $states; $i++) {
252 258
		if ($res[$i]['direction'] === "out") {

Also available in: Unified diff