summaryrefslogtreecommitdiffstats
path: root/usr/local/www/edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-09-28 05:06:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-09-28 05:06:36 +0000
commit5f05c1e8194db6c9ae551bc3c92a40d66390f013 (patch)
treed4f4ba2be547748cb004e76b854ad4fb16e89c3a /usr/local/www/edit.php
parent77045939e7ada2d6d65cee80b60a1195c4f46747 (diff)
downloadpfsense-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-xusr/local/www/edit.php5
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'])) {
OpenPOWER on IntegriCloud