From 5cfb93bc648e076ef2d3e0b7a4f1eaafd8b82e3d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 9 Aug 2006 02:29:54 +0000 Subject: 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. --- usr/local/www/edit.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr/local/www/edit.php') 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(); }
- Rows: + Rows: Cols: - | + | Highlighting: >Enabled >Disabled -- cgit v1.1