diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-09-28 05:06:36 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-09-28 05:06:36 +0000 |
commit | 5f05c1e8194db6c9ae551bc3c92a40d66390f013 (patch) | |
tree | d4f4ba2be547748cb004e76b854ad4fb16e89c3a /usr/local/www/edit.php | |
parent | 77045939e7ada2d6d65cee80b60a1195c4f46747 (diff) | |
download | pfsense-5f05c1e8194db6c9ae551bc3c92a40d66390f013.zip pfsense-5f05c1e8194db6c9ae551bc3c92a40d66390f013.tar.gz |
Automatically remote /tmp/config.cache if it exists after file save.
Diffstat (limited to 'usr/local/www/edit.php')
-rwxr-xr-x | usr/local/www/edit.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php index 1504d43..ebddf3a 100755 --- a/usr/local/www/edit.php +++ b/usr/local/www/edit.php @@ -1,4 +1,4 @@ -<?php +1<?php /* $Id$ */ /* edit.php @@ -53,6 +53,9 @@ if($_REQUEST['action']) { echo "|No file name specified.|"; } else { $ret = file_put_contents($_REQUEST['file'], $_REQUEST['data']); + if($_REQUEST['file'] == "config.xml") + if(file_exists("/tmp/config.cache")) + unlink("/tmp/config.cache"); if($ret === false) { echo "|Failed to write file.|"; } elseif($ret <> strlen($_REQUEST['data'])) { |