diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-02-10 16:08:07 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-02-10 16:08:07 +0100 |
commit | 2c1b25d68193117a555ae54c498e602993a1aa2c (patch) | |
tree | c68493d93e7a8caf678ea8b62880c6cc8cb2ad43 /usr/local | |
parent | 9103d9ee6c46a3fd36f2dfb5cd624a8e6a5366a8 (diff) | |
parent | 0fc6be3f54db706ccc7cce8b19b12f88dec171fa (diff) | |
download | pfsense-2c1b25d68193117a555ae54c498e602993a1aa2c.zip pfsense-2c1b25d68193117a555ae54c498e602993a1aa2c.tar.gz |
Merge remote branch 'upstream/master'
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/crash_reporter.php | 8 | ||||
-rw-r--r-- | usr/local/www/firewall_shaper_vinterface.php | 27 | ||||
-rw-r--r-- | usr/local/www/status_filter_reload.php | 2 |
3 files changed, 25 insertions, 12 deletions
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php index 8b03936..b82589a 100755 --- a/usr/local/www/crash_reporter.php +++ b/usr/local/www/crash_reporter.php @@ -49,10 +49,8 @@ function upload_crash_report($files) { $post = array(); $counter = 0; foreach($files as $file) { - if(filesize($cf) < FILE_SIZE) { - $post["file{$counter}"] = "@{$file}"; - $counter++; - } + $post["file{$counter}"] = "@{$file}"; + $counter++; } $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); @@ -122,7 +120,7 @@ $crash_report_header .= "\nCrash report details:\n"; exit; } else { $crash_files = glob("/var/crash/*"); - $crash_reports .= $crash_report_header; + $crash_reports = $crash_report_header; if(is_array($crash_files)) { foreach($crash_files as $cf) { if(filesize($cf) < FILE_SIZE) { diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php index 865f048..5222771 100644 --- a/usr/local/www/firewall_shaper_vinterface.php +++ b/usr/local/www/firewall_shaper_vinterface.php @@ -71,10 +71,12 @@ if ($_GET) { if ($_POST) { if ($_POST['name']) $qname = htmlspecialchars(trim($_POST['name'])); + else if ($_POST['newname']) + $qname = htmlspecialchars(trim($_POST['name'])); if ($_POST['pipe']) $pipe = htmlspecialchars(trim($_POST['pipe'])); else - $pipe = htmlspecialchars(trim($_POST['name'])); + $pipe = htmlspecialchars(trim($qname)); if ($_POST['parentqueue']) $parentqueue = htmlspecialchars(trim($_POST['parentqueue'])); } @@ -94,12 +96,25 @@ if ($_GET) { switch ($action) { case "delete": if ($queue) { - $queue->delete_queue(); - write_config(); - mark_subsystem_dirty('shaper'); + if (is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $rule) { + if ($rule['dnpipe'] == $queue->GetNumber() || $rule['pdnpipe'] == $queue->GetNumber()) + $input_errors[] = gettext("This pipe/queue is referenced in filter rules, please remove references from there before deleteing."); + } + } + if (!$input_errors) { + $queue->delete_queue(); + write_config(); + mark_subsystem_dirty('shaper'); + header("Location: firewall_shaper_vinterface.php"); + exit; + } + $output_form .= $queue->build_form(); + } else { + $input_errors[] = gettext("No queue with name {$qname} was found!"); + $output_form .= "<p class=\"pgtitle\">" . $dn_default_shaper_msg."</p>"; + $dontshow = true; } - header("Location: firewall_shaper_vinterface.php"); - exit; break; case "resetall": foreach ($dummynet_pipe_list as $dn) diff --git a/usr/local/www/status_filter_reload.php b/usr/local/www/status_filter_reload.php index ddd57ca..d1e54a9 100644 --- a/usr/local/www/status_filter_reload.php +++ b/usr/local/www/status_filter_reload.php @@ -69,7 +69,7 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <br/> <a href="/status_filter_reload.php?reloadfilter=true"><input type="button" value="Reload Filter" id="reloadfilter"></a> -<?php if ($config["installedpackages"]["carpsettings"]["config"][0]["pfsyncpeerip"] != ""): ?> +<?php if (is_array($config["installedpackages"]["carpsettings"]["config"][0]) && $config["installedpackages"]["carpsettings"]["config"][0]["pfsyncpeerip"] != ""): ?> <a href="/status_filter_reload.php?syncfilter=true"><input type="button" value="Force Config Sync" id="syncfilter"></a> <? endif; ?> |