Fixed _vd() ebug function to use also in ajax mode.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 24 Nov 2008 20:02:14 +0000 (20:02 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 24 Nov 2008 20:02:14 +0000 (20:02 +0000)
includes/ui/ui_view.inc

index 2be9bbd1a2453ca21acddc07d283d318eefd8402..221ba624f3e3d64a1365615d1e6ba17040e0ef78 100644 (file)
@@ -1094,9 +1094,10 @@ if (!function_exists('_vd'))
        function _vd($mixed, $title = '', $exit = false)
        {
        // Only the site admin is able to proceed here.
-       echo (!empty($title) ? ($title .':') : '') .'<pre>';
-       var_dump($mixed);
-       echo "</pre>\n";
+       $str = (!empty($title) ? ($title .':') : '') .'<pre>';
+       $str .= print_r($mixed, true); //var_dump($mixed);
+       $str .= "</pre>\n";
+               display_error('<table><tr><td>'.$str.'</td></tr></table>');
        if ($exit)
                exit;
        }