summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-23 22:27:13 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-23 22:27:13 +0000
commitc52087add53abbb36eb3a080dedfeb8813ed70cf (patch)
tree1f129a46a151cc5eb78564fd17b713ed8e184554 /usr/local/www
parent55b6c57d8d6aa34f63f86a5e7c8b6bea0148a488 (diff)
downloadpfsense-c52087add53abbb36eb3a080dedfeb8813ed70cf.zip
pfsense-c52087add53abbb36eb3a080dedfeb8813ed70cf.tar.gz
* Use new style messages only
* Automatically mount image rw before saving
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/edit.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 02273c7..ae8e073 100755
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -37,17 +37,18 @@ if (($_POST['submit'] == "Load") && file_exists($_POST['savetopath'])) {
$content = fread($fd, filesize($_POST['savetopath']));
fclose($fd);
$edit_area="";
- $ulmsg = "Loaded text from " . $_POST['savetopath'];
+ $savemsg = "Loaded text from " . $_POST['savetopath'];
} else if (($_POST['submit'] == "Save")) {
+ conf_mount_rw();
$content = ereg_replace("\r","",$_POST['content']) ;
$fd = fopen($_POST['savetopath'], "w");
fwrite($fd, $content);
fclose($fd);
$edit_area="";
- $ulmsg = "Saved text to " . $_POST['savetopath'];
$savemsg = "Saved text to " . $_POST['savetopath'];
+ conf_mount_ro();
} else if (($_POST['submit'] == "Load") && !file_exists($_POST['savetopath'])) {
- $ulmsg = "File not found " . $_POST['savetopath'];
+ $savemsg = "File not found " . $_POST['savetopath'];
$content = "";
$_POST['savetopath'] = "";
}
@@ -140,7 +141,6 @@ function sf() { document.forms[0].savetopath.focus(); }
</script>
<body onLoad="sf();">
<p><span class="pgtitle"><?=$Title ?></span>
-<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<form action="edit.php" method="POST">
<table>
OpenPOWER on IntegriCloud