From f6332796d346869dc1607d698833b23babc9b9db Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 28 May 2014 14:54:20 -0300 Subject: Trucate file using a better way than ugly exec() Calls --- config/autoconfigbackup/autoconfigbackup.xml | 2 +- config/autoconfigbackup/autoconfigbackup_backup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config/autoconfigbackup') diff --git a/config/autoconfigbackup/autoconfigbackup.xml b/config/autoconfigbackup/autoconfigbackup.xml index f3505f6a..47391f4b 100644 --- a/config/autoconfigbackup/autoconfigbackup.xml +++ b/config/autoconfigbackup/autoconfigbackup.xml @@ -145,7 +145,7 @@ /cf/conf/lastpfSbackup.txt"); + file_put_contents("/cf/conf/lastpfSbackup.txt", ""); conf_mount_ro(); if(!function_exists("filter_configure")) require_once("filter.inc"); diff --git a/config/autoconfigbackup/autoconfigbackup_backup.php b/config/autoconfigbackup/autoconfigbackup_backup.php index a65fba4d..9ef752fa 100644 --- a/config/autoconfigbackup/autoconfigbackup_backup.php +++ b/config/autoconfigbackup/autoconfigbackup_backup.php @@ -48,7 +48,7 @@ if($_POST) { else write_config("Backup invoked via Auto Config Backup."); $config = parse_config(true); - exec("echo > /cf/conf/lastpfSbackup.txt"); + file_put_contents("/cf/conf/lastpfSbackup.txt", ""); upload_config($_REQUEST['reason']); $savemsg = "Backup completed successfully."; $donotshowheader=true; -- cgit v1.2.3