2009-09-18 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_html.php: add second parameter for trace a log in server
	file (plain text).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1977 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2009-09-25 16:09:01 +00:00
parent 0adc2b3c88
commit 9e948d6d4c
2 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-09-18 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: add second parameter for trace a log in server
file (plain text).
2009-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager.php: add checkbox to multiple delete

View File

@ -22,8 +22,22 @@
/**
* Prints the print_r with < pre > tags
*/
function debugPrint ($var) {
echo "<pre>";print_r($var);echo "</pre>";
function debugPrint ($var, $file = '') {
if ($file === true)
$file = '/tmp/logDebug';
if (strlen($file) > 0) {
$f = fopen($file, "a");
ob_start();
echo date("Y/m/d H:i:s") . "\n";
print_r($var);
echo "\n\n";
$output = ob_get_clean();
fprintf($f,"%s",$output);
fclose($f);
}
else {
echo "<pre>";print_r($var);echo "</pre>";
}
}