diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-08-09 02:29:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-08-09 02:29:54 +0000 |
commit | 5cfb93bc648e076ef2d3e0b7a4f1eaafd8b82e3d (patch) | |
tree | 92bcb5fa34703332fc0e4b84c4ca26576e9a024c /usr | |
parent | e212156b1c5e700a4144821690a57b904c88780c (diff) | |
download | pfsense-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-x | usr/local/www/edit.php | 8 |
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 |