summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-08-09 02:29:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-08-09 02:29:54 +0000
commit5cfb93bc648e076ef2d3e0b7a4f1eaafd8b82e3d (patch)
tree92bcb5fa34703332fc0e4b84c4ca26576e9a024c /usr
parente212156b1c5e700a4144821690a57b904c88780c (diff)
downloadpfsense-5cfb93bc648e076ef2d3e0b7a4f1eaafd8b82e3d.zip
pfsense-5cfb93bc648e076ef2d3e0b7a4f1eaafd8b82e3d.tar.gz
When editing config.xml, automatically kill /tmp/config.cache if it exists as the user does not wish for config.xml to be restored from the cache.
This makes it easier to edit config.xml from the Diagnostics -> Edit menu.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/edit.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 8ba9e2c..0589c18 100755
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -38,7 +38,7 @@ if (($_POST['submit'] == "Load") && file_exists($_POST['savetopath'])) {
if(stristr($_POST['savetopath'], ".php") == true)
$language = "php";
else if(stristr($_POST['savetopath'], ".inc") == true)
- $language = "php";
+ $language = "php";
else if(stristr($_POST['savetopath'], ".sh") == true)
$language = "core";
else if(stristr($_POST['savetopath'], ".xml") == true)
@@ -51,6 +51,8 @@ if (($_POST['submit'] == "Load") && file_exists($_POST['savetopath'])) {
fclose($fd);
$edit_area="";
$savemsg = "Saved text to " . $_POST['savetopath'];
+ if($_POST['savetopath'] == "/cf/conf/config.xml")
+ unlink_if_exists("/tmp/config.cache");
conf_mount_ro();
} else if (($_POST['submit'] == "Load") && !file_exists($_POST['savetopath'])) {
$savemsg = "File not found " . $_POST['savetopath'];
@@ -134,10 +136,10 @@ function sf() { document.forms[0].savetopath.focus(); }
<input name="submit" type="submit" class="button" id="Load" value="Load"> <input name="submit" type="submit" class="button" id="Save" value="Save">
<hr noshade>
<?php if($_POST['highlight'] == "no"): ?>
- Rows: <input size="3" name="rows" value="<? echo $rows; ?>">
+ Rows: <input size="3" name="rows" value="<? echo $rows; ?>">
Cols: <input size="3" name="cols" value="<? echo $cols; ?>">
<?php endif; ?>
- |
+ |
Highlighting: <input name="highlight" type="radio" value="yes"
<?php if($highlight == "yes") echo " checked"; ?>>Enabled
<input name="highlight" type="radio" value="no"<?php if($highlight == "no") echo " checked"; ?>>Disabled
OpenPOWER on IntegriCloud