diff options
author | Phil Davis <phil.davis@inf.org> | 2015-04-19 18:00:00 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-04-19 18:00:00 +0545 |
commit | 5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e (patch) | |
tree | cd25c71caf551eb882f460ac6e1c32c8220fe58f /usr/local/www/diag_patterns.php | |
parent | 0608bd3c354ea76eb6df9ed9322e2ef8686f15e7 (diff) | |
download | pfsense-5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e.zip pfsense-5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e.tar.gz |
Code style usr-local-www diag
Diffstat (limited to 'usr/local/www/diag_patterns.php')
-rw-r--r-- | usr/local/www/diag_patterns.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/diag_patterns.php b/usr/local/www/diag_patterns.php index 680f76f..1c3528d 100644 --- a/usr/local/www/diag_patterns.php +++ b/usr/local/www/diag_patterns.php @@ -41,17 +41,18 @@ require("guiconfig.inc"); //Move the upload file to /usr/local/share/protocols (is_uploaded_file must use tmp_name as argument) if (($_POST['submit'] == gettext("Upload Pattern file")) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { - if(fileExtension($_FILES['ulfile']['name'])) { - if (!is_array($config['l7shaper']['custom_pat'])) + if (fileExtension($_FILES['ulfile']['name'])) { + if (!is_array($config['l7shaper']['custom_pat'])) { $config['l7shaper']['custom_pat'] = array(); + } $config['l7shaper']['custom_pat'][$_FILES['ulfile']['name']] = base64_encode(file_get_contents($_FILES['ulfile']['tmp_name'])); write_config(sprintf(gettext("Added custom l7 pattern %s"), $_FILES['ulfile']['name'])); move_uploaded_file($_FILES['ulfile']['tmp_name'], "/usr/local/share/protocols/" . $_FILES['ulfile']['name']); $ulmsg = gettext("Uploaded file to") . " /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']); - } - else + } else { $ulmsg = gettext("Warning: You must upload a file with .pat extension."); + } } //Check if file has correct extension (.pat) |