/tmp/provisioning_log.txt only when debug is on

This commit is contained in:
luis daniel lucio quiroz
2015-04-09 17:03:50 +00:00
parent 72c03a4b42
commit 0a79e6e2d8
@@ -712,12 +712,13 @@ include "root.php";
$file_contents = $view->render($file); $file_contents = $view->render($file);
//log file for testing //log file for testing
//$tmp_file = "/tmp/provisioning_log.txt"; if ($_SESSION['provision']['debug']['boolean'] == 'true'){
//$fh = fopen($tmp_file, 'w') or die("can't open file"); $tmp_file = "/tmp/provisioning_log.txt";
//$tmp_string = $mac."\n"; $fh = fopen($tmp_file, 'w') or die("can't open file");
//fwrite($fh, $tmp_string); $tmp_string = $mac."\n";
//fclose($fh); fwrite($fh, $tmp_string);
fclose($fh);
}
//returned the rendered template //returned the rendered template
return $file_contents; return $file_contents;