| 3 |
## $Id$ |
## $Id$ |
| 4 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
| 5 |
## $Log$ |
## $Log$ |
| 6 |
|
## Revision 1.3 2003/02/09 17:51:59 joko |
| 7 |
|
## + minor update related to new log level constants |
| 8 |
|
## |
| 9 |
|
## Revision 1.2 2002/12/19 06:22:09 joko |
| 10 |
|
## + function _t |
| 11 |
|
## |
| 12 |
## Revision 1.1 2002/12/13 02:24:55 joko |
## Revision 1.1 2002/12/13 02:24:55 joko |
| 13 |
## + refactored code |
## + refactored code |
| 14 |
## |
## |
| 27 |
## |
## |
| 28 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
| 29 |
|
|
| 30 |
|
|
| 31 |
|
// TODO: |
| 32 |
|
// - try to encapsulate this code and re-export via method-linking to global scope |
| 33 |
|
// - is this possible with PHP? |
| 34 |
|
|
| 35 |
// 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? |
| 36 |
function getlt($key, $tpl=array()) { |
function getlt($key, $tpl=array()) { |
| 37 |
//global $lt; |
//global $lt; |
| 42 |
//print "<br>"; |
//print "<br>"; |
| 43 |
//return $lt->getlt($key, $tpl); |
//return $lt->getlt($key, $tpl); |
| 44 |
//print "a" . Dumper($site); |
//print "a" . Dumper($site); |
| 45 |
return $site->lt->getlt($key, $tpl); |
return $site->localetext->getlt($key, $tpl); |
| 46 |
} |
} |
| 47 |
|
|
| 48 |
// 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? |
| 52 |
} |
} |
| 53 |
|
|
| 54 |
// wrapper-function for getting the logger instance |
// wrapper-function for getting the logger instance |
| 55 |
function logp($string, $level) { |
function logp($string, $level = PEAR_LOG_DEBUG) { |
| 56 |
global $site; |
global $site; |
| 57 |
//return; |
//return; |
| 58 |
$site->log($string, $level); |
$site->log($string, $level); |
| 59 |
} |
} |
| 60 |
|
|
| 61 |
function dprint($message, $level = E_USER_NOTICE) { |
function dprint($message, $level = E_USER_NOTICE) { |
| 62 |
//debug_append($message, $level); |
//debug_append($message, $level); |
| 63 |
trigger_error($message, $level); |
trigger_error($message, $level); |
| 64 |
} |
} |
| 65 |
|
|
| 66 |
|
function _t($identifier, $data = array()) { |
| 67 |
|
global $site; |
| 68 |
|
return $site->template->get("lt:$identifier", $data); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
?> |
?> |