blob: 0fd8e7c7b6402177fc20dcbce1c3b6472b8c421b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/** \file
* $Header$
*
* @author zaufi <zaufi@sendmail.ru>
*/
/**
* \brief Smarty modifier plugin to add string to debug console log w/o modify output
* Usage format {$gBitSmarty_var|dbg}
*/
function smarty_modifier_dbg($string, $label = '')
{
global $debugger, $gBitSystem;
if( $gBitSystem->isPackageActive( 'debug' ) ) {
require_once( DEBUG_PKG_PATH.'debugger.php' );
//
$debugger->msg('Smarty log'.((strlen($label) > 0) ? ': '.$label : '').': '.$string);
return $string;
}
}
?>
|