Merge branch '000-tool_debug' into 'develop'
add new params html_debug for strig in one line and new alias hd See merge request artica/pandorafms!1789
This commit is contained in:
commit
da6fe0ec6b
|
@ -47,7 +47,7 @@ else{
|
|||
/**
|
||||
* Prints the print_r with < pre > tags
|
||||
*/
|
||||
function html_debug_print ($var, $file = '') {
|
||||
function html_debug_print ($var, $file = '', $oneline = false) {
|
||||
$more_info = '';
|
||||
if (is_string($var)) {
|
||||
$more_info = 'size: ' . strlen($var);
|
||||
|
@ -66,6 +66,9 @@ function html_debug_print ($var, $file = '') {
|
|||
if ($file === true)
|
||||
$file = '/tmp/logDebug';
|
||||
|
||||
if($oneline && is_string($var))
|
||||
$var = preg_replace("/[\t|\n| ]+/", " ", $var);
|
||||
|
||||
if (strlen($file) > 0) {
|
||||
$f = fopen($file, "a");
|
||||
ob_start();
|
||||
|
@ -85,8 +88,13 @@ function html_debug_print ($var, $file = '') {
|
|||
}
|
||||
|
||||
// Alias for "html_debug_print"
|
||||
function html_debug ($var, $file = '') {
|
||||
html_debug_print ($var, $file);
|
||||
function html_debug ($var, $file = '', $oneline = false) {
|
||||
html_debug_print ($var, $file, $oneline);
|
||||
}
|
||||
|
||||
// Alias for "html_debug_print"
|
||||
function hd ($var, $file = '', $oneline = false) {
|
||||
html_debug_print ($var, $file, $oneline);
|
||||
}
|
||||
|
||||
function html_f2str($function, $params) {
|
||||
|
|
Loading…
Reference in New Issue