3 |
## $Id$ |
## $Id$ |
4 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
5 |
## $Log$ |
## $Log$ |
6 |
|
## Revision 1.5 2003/04/11 01:29:13 joko |
7 |
|
## moved function 'logp' to org.netfrag.glib:utils/extensions.php |
8 |
|
## |
9 |
|
## Revision 1.4 2003/02/13 21:55:52 joko |
10 |
|
## + logging now via the global app instance |
11 |
|
## |
12 |
|
## Revision 1.3 2003/02/09 17:51:59 joko |
13 |
|
## + minor update related to new log level constants |
14 |
|
## |
15 |
|
## Revision 1.2 2002/12/19 06:22:09 joko |
16 |
|
## + function _t |
17 |
|
## |
18 |
## Revision 1.1 2002/12/13 02:24:55 joko |
## Revision 1.1 2002/12/13 02:24:55 joko |
19 |
## + refactored code |
## + refactored code |
20 |
## |
## |
33 |
## |
## |
34 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
35 |
|
|
36 |
|
|
37 |
|
// TODO: |
38 |
|
// - try to encapsulate this code and re-export via method-linking to global scope |
39 |
|
// - is this possible with PHP? |
40 |
|
|
41 |
// wrapper-function for convenient use of "getlt"..... are there "Alias"es in php? |
// wrapper-function for convenient use of "getlt"..... are there "Alias"es in php? |
42 |
function getlt($key, $tpl=array()) { |
function getlt($key, $tpl=array()) { |
43 |
//global $lt; |
//global $lt; |
48 |
//print "<br>"; |
//print "<br>"; |
49 |
//return $lt->getlt($key, $tpl); |
//return $lt->getlt($key, $tpl); |
50 |
//print "a" . Dumper($site); |
//print "a" . Dumper($site); |
51 |
return $site->lt->getlt($key, $tpl); |
return $site->localetext->getlt($key, $tpl); |
52 |
} |
} |
53 |
|
|
54 |
// wrapper-function for convenient use of "getlink"..... are there "Alias"es in php? |
// wrapper-function for convenient use of "getlink"..... are there "Alias"es in php? |
57 |
return $site->getLink( $key, $attribs ); |
return $site->getLink( $key, $attribs ); |
58 |
} |
} |
59 |
|
|
60 |
// wrapper-function for getting the logger instance |
function dprint($message, $level = E_USER_NOTICE) { |
61 |
function logp($string, $level) { |
//debug_append($message, $level); |
62 |
|
trigger_error($message, $level); |
63 |
|
} |
64 |
|
|
65 |
|
function _t($identifier, $data = array()) { |
66 |
global $site; |
global $site; |
67 |
//return; |
return $site->template->get("lt:$identifier", $data); |
|
$site->log($string, $level); |
|
68 |
} |
} |
69 |
|
|
|
function dprint($message, $level = E_USER_NOTICE) { |
|
|
//debug_append($message, $level); |
|
|
trigger_error($message, $level); |
|
|
} |
|
|
|
|
|
|
|
70 |
?> |
?> |