summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_backup.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-07 17:12:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-07 17:12:46 +0000
commit6198d330da6ec077e30ba99155de451cadb12d32 (patch)
tree6c7e20a85a35d277d863a8a9703048ccd004cee2 /usr/local/www/diag_backup.php
parenta068feb20d9165d317f55c601c8b6fafd405bf06 (diff)
downloadpfsense-6198d330da6ec077e30ba99155de451cadb12d32.zip
pfsense-6198d330da6ec077e30ba99155de451cadb12d32.tar.gz
Pass file handle to $fd
Ticket #587
Diffstat (limited to 'usr/local/www/diag_backup.php')
-rwxr-xr-xusr/local/www/diag_backup.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index c416dd1..1aa1bf5 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -121,11 +121,11 @@ if ($_POST) {
$tmp .= fread($fd,49);
}
fclose($fd);
- if(stristr($tmp, "m0n0wall" != false)) {
+ if(stristr($tmp, "m0n0wall" == true)) {
log_error("Upgrading m0n0wall configuration to pfsense.");
/* m0n0wall was found in config. convert it. */
$upgradedconfig = str_replace("m0n0wall", "pfsense", $tmp);
- fopen($_FILES['conffile']['tmp_name'], "w");
+ $fd = fopen($_FILES['conffile']['tmp_name'], "w");
fwrite($fd, $upgradedconfig);
fclose($fd);
}
OpenPOWER on IntegriCloud