/[cvs]/nfo/php/libs/org.netfrag.flib/utils/shortcuts.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.flib/utils/shortcuts.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Fri Apr 11 01:29:13 2003 UTC (21 years, 4 months ago) by joko
Branch: MAIN
Changes since 1.4: +4 -7 lines
moved function 'logp' to org.netfrag.glib:utils/extensions.php

1 joko 1.1 <?
2     ## -----------------------------------------------------------------------------
3 joko 1.5 ## $Id: shortcuts.php,v 1.4 2003/02/13 21:55:52 joko Exp $
4 joko 1.1 ## -----------------------------------------------------------------------------
5     ## $Log: shortcuts.php,v $
6 joko 1.5 ## Revision 1.4 2003/02/13 21:55:52 joko
7     ## + logging now via the global app instance
8     ##
9 joko 1.4 ## Revision 1.3 2003/02/09 17:51:59 joko
10     ## + minor update related to new log level constants
11     ##
12 joko 1.3 ## Revision 1.2 2002/12/19 06:22:09 joko
13     ## + function _t
14     ##
15 joko 1.2 ## Revision 1.1 2002/12/13 02:24:55 joko
16     ## + refactored code
17     ##
18 joko 1.1 ## Revision 1.4 2002/12/03 17:01:37 cvsjoko
19     ## + testing
20     ##
21     ## Revision 1.3 2002/12/01 22:05:29 cvsjoko
22     ## + bugfixing tests / debugging output
23     ##
24     ## Revision 1.2 2002/12/01 17:44:50 cvsjoko
25     ## + modification to function getlt
26     ##
27     ## Revision 1.1 2002/11/12 06:05:18 cvsjoko
28     ## + initial checkin
29     ## + shortcut functions to often used methods
30     ##
31     ## -----------------------------------------------------------------------------
32    
33 joko 1.2
34     // TODO:
35     // - try to encapsulate this code and re-export via method-linking to global scope
36     // - is this possible with PHP?
37    
38 joko 1.1 // wrapper-function for convenient use of "getlt"..... are there "Alias"es in php?
39     function getlt($key, $tpl=array()) {
40     //global $lt;
41     global $site;
42     //print "yai - <br>";
43     //print Dumper($_SESSION);
44     //print Dumper($lt);
45     //print "<br>";
46     //return $lt->getlt($key, $tpl);
47     //print "a" . Dumper($site);
48 joko 1.2 return $site->localetext->getlt($key, $tpl);
49 joko 1.1 }
50    
51     // wrapper-function for convenient use of "getlink"..... are there "Alias"es in php?
52     function getlink( $key, $attribs = array() ) {
53     global $site;
54     return $site->getLink( $key, $attribs );
55     }
56    
57 joko 1.2 function dprint($message, $level = E_USER_NOTICE) {
58     //debug_append($message, $level);
59     trigger_error($message, $level);
60     }
61    
62     function _t($identifier, $data = array()) {
63     global $site;
64     return $site->template->get("lt:$identifier", $data);
65     }
66 joko 1.1
67     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed