summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-31 22:23:15 +0545
committerPhil Davis <phil.davis@inf.org>2015-08-31 22:23:15 +0545
commit288a2a0f294f992a9536dfbb5c54dd528badbad5 (patch)
tree8d1c6be8a2cf5848f6df06b631ce2614485648fe /src/usr/local/www/edit.php
parent683ba309d50913828decb5fe3f6ade059c1dfab2 (diff)
downloadpfsense-288a2a0f294f992a9536dfbb5c54dd528badbad5.zip
pfsense-288a2a0f294f992a9536dfbb5c54dd528badbad5.tar.gz
bootstrap usr/local/www a to e minor edits
Diffstat (limited to 'src/usr/local/www/edit.php')
-rw-r--r--src/usr/local/www/edit.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/usr/local/www/edit.php b/src/usr/local/www/edit.php
index aedf9ed..a00069c 100644
--- a/src/usr/local/www/edit.php
+++ b/src/usr/local/www/edit.php
@@ -72,15 +72,15 @@ require("guiconfig.inc");
if ($_POST['action']) {
switch ($_POST['action']) {
case 'load':
- if(strlen($_POST['file']) < 1) {
+ if (strlen($_POST['file']) < 1) {
print('|5|' . '<div class="alert alert-danger" role="alert">'.gettext("No file name specified").'</div>' . '|');
- } elseif(is_dir($_POST['file'])) {
+ } elseif (is_dir($_POST['file'])) {
print('|4|' . '<div class="alert alert-danger" role="alert">' . gettext("Loading a directory is not supported") .'</div>' . '|');
- } elseif(! is_file($_POST['file'])) {
+ } elseif (!is_file($_POST['file'])) {
print('|3|' . '<div class="alert alert-danger" role="alert">' . gettext("File does not exist or is not a regular file") . '</div>' . '|');
} else {
$data = file_get_contents(urldecode($_POST['file']));
- if($data === false) {
+ if ($data === false) {
print('|1|' . '<div class="alert alert-danger" role="alert">' . gettext("Failed to read file") . '</div>' . '|');
} else {
$data = base64_encode($data);
@@ -90,7 +90,7 @@ if ($_POST['action']) {
exit;
case 'save':
- if(strlen($_POST['file']) < 1) {
+ if (strlen($_POST['file']) < 1) {
print('|' . '<div class="alert alert-danger" role="alert">'.gettext("No file name specified").'</div>' . '|');
} else {
conf_mount_rw();
@@ -103,9 +103,9 @@ if ($_POST['action']) {
}
disable_security_checks();
}
- if($ret === false) {
+ if ($ret === false) {
print('|' . '<div class="alert alert-danger" role="alert">' . gettext("Failed to write file") . '</div>' . '|');
- } elseif($ret != strlen($_POST['data'])) {
+ } elseif ($ret != strlen($_POST['data'])) {
print('|' . '<div class="alert alert-danger" role="alert">' . gettext("Error while writing file") . '</div>' . '|');
} else {
print('|' . '<div class="alert alert-success" role="alert">' . gettext("File saved successfully") . '</div>' . '|');
@@ -201,7 +201,7 @@ require("head.inc");
);
}
- <?php if($_GET['action'] == "load"): ?>
+ <?php if ($_GET['action'] == "load"): ?>
events.push(function() {
jQuery("#fbTarget").val("<?=htmlspecialchars($_GET['path'])?>");
loadFile();
OpenPOWER on IntegriCloud