| 1 | 
joko | 
1.1 | 
<? | 
| 2 | 
  | 
  | 
##    ----------------------------------------------------------------------------- | 
| 3 | 
  | 
  | 
##    $Id: shortcuts.php,v 1.4 2002/12/03 17:01:37 cvsjoko Exp $ | 
| 4 | 
  | 
  | 
##    ----------------------------------------------------------------------------- | 
| 5 | 
  | 
  | 
##    $Log: shortcuts.php,v $ | 
| 6 | 
  | 
  | 
##    Revision 1.4  2002/12/03 17:01:37  cvsjoko | 
| 7 | 
  | 
  | 
##    + testing | 
| 8 | 
  | 
  | 
## | 
| 9 | 
  | 
  | 
##    Revision 1.3  2002/12/01 22:05:29  cvsjoko | 
| 10 | 
  | 
  | 
##    + bugfixing tests / debugging output | 
| 11 | 
  | 
  | 
## | 
| 12 | 
  | 
  | 
##    Revision 1.2  2002/12/01 17:44:50  cvsjoko | 
| 13 | 
  | 
  | 
##    + modification to function getlt | 
| 14 | 
  | 
  | 
## | 
| 15 | 
  | 
  | 
##    Revision 1.1  2002/11/12 06:05:18  cvsjoko | 
| 16 | 
  | 
  | 
##    + initial checkin | 
| 17 | 
  | 
  | 
##    + shortcut functions to often used methods | 
| 18 | 
  | 
  | 
## | 
| 19 | 
  | 
  | 
##    ----------------------------------------------------------------------------- | 
| 20 | 
  | 
  | 
 | 
| 21 | 
  | 
  | 
// wrapper-function for convenient use of "getlt".....   are there "Alias"es in php? | 
| 22 | 
  | 
  | 
  function getlt($key, $tpl=array()) { | 
| 23 | 
  | 
  | 
    //global $lt; | 
| 24 | 
  | 
  | 
    global $site; | 
| 25 | 
  | 
  | 
    //print "yai - <br>"; | 
| 26 | 
  | 
  | 
    //print Dumper($_SESSION); | 
| 27 | 
  | 
  | 
    //print Dumper($lt); | 
| 28 | 
  | 
  | 
    //print "<br>"; | 
| 29 | 
  | 
  | 
    //return $lt->getlt($key, $tpl); | 
| 30 | 
  | 
  | 
    //print "a" . Dumper($site); | 
| 31 | 
  | 
  | 
    return $site->lt->getlt($key, $tpl); | 
| 32 | 
  | 
  | 
  } | 
| 33 | 
  | 
  | 
 | 
| 34 | 
  | 
  | 
// wrapper-function for convenient use of "getlink".....   are there "Alias"es in php? | 
| 35 | 
  | 
  | 
  function getlink( $key, $attribs = array() ) { | 
| 36 | 
  | 
  | 
    global $site; | 
| 37 | 
  | 
  | 
    return $site->getLink( $key, $attribs ); | 
| 38 | 
  | 
  | 
  } | 
| 39 | 
  | 
  | 
 | 
| 40 | 
  | 
  | 
// wrapper-function for getting the logger instance | 
| 41 | 
  | 
  | 
  function logp($string, $level) { | 
| 42 | 
  | 
  | 
    global $site; | 
| 43 | 
  | 
  | 
    //return; | 
| 44 | 
  | 
  | 
    $site->log($string, $level); | 
| 45 | 
  | 
  | 
  } | 
| 46 | 
  | 
  | 
 | 
| 47 | 
  | 
  | 
function dprint($message, $level = E_USER_NOTICE) { | 
| 48 | 
  | 
  | 
  //debug_append($message, $level); | 
| 49 | 
  | 
  | 
  trigger_error($message, $level); | 
| 50 | 
  | 
  | 
} | 
| 51 | 
  | 
  | 
 | 
| 52 | 
  | 
  | 
 | 
| 53 | 
  | 
  | 
?> |