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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Fri Dec 13 02:24:55 2002 UTC revision 1.6 by jonen, Mon Oct 25 17:14:17 2004 UTC
# Line 3  Line 3 
3  ##    $Id$  ##    $Id$
4  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
5  ##    $Log$  ##    $Log$
6    ##    Revision 1.6  2004/10/25 17:14:17  jonen
7    ##    + added function to get language-related image
8    ##
9    ##    Revision 1.5  2003/04/11 01:29:13  joko
10    ##    moved function 'logp' to org.netfrag.glib:utils/extensions.php
11    ##
12    ##    Revision 1.4  2003/02/13 21:55:52  joko
13    ##    + logging now via the global app instance
14    ##
15    ##    Revision 1.3  2003/02/09 17:51:59  joko
16    ##    + minor update related to new log level constants
17    ##
18    ##    Revision 1.2  2002/12/19 06:22:09  joko
19    ##    + function _t
20    ##
21  ##    Revision 1.1  2002/12/13 02:24:55  joko  ##    Revision 1.1  2002/12/13 02:24:55  joko
22  ##    + refactored code  ##    + refactored code
23  ##  ##
# Line 21  Line 36 
36  ##  ##
37  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
38    
39    
40    // TODO:
41    // - try to encapsulate this code and re-export via method-linking to global scope
42    // - is this possible with PHP?
43    
44  // 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?
45    function getlt($key, $tpl=array()) {    function getlt($key, $tpl=array()) {
46      //global $lt;      //global $lt;
# Line 31  Line 51 
51      //print "<br>";      //print "<br>";
52      //return $lt->getlt($key, $tpl);      //return $lt->getlt($key, $tpl);
53      //print "a" . Dumper($site);      //print "a" . Dumper($site);
54      return $site->lt->getlt($key, $tpl);      return $site->localetext->getlt($key, $tpl);
55    }    }
56    
57  // 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?
# Line 40  Line 60 
60      return $site->getLink( $key, $attribs );      return $site->getLink( $key, $attribs );
61    }    }
62    
63  // wrapper-function for getting the logger instance    function dprint($message, $level = E_USER_NOTICE) {
64    function logp($string, $level) {      //debug_append($message, $level);
65        trigger_error($message, $level);
66      }
67      
68      function _t($identifier, $data = array()) {
69      global $site;      global $site;
70      //return;      return $site->template->get("lt:$identifier", $data);
71      $site->log($string, $level);    }
72      
73      function getltimg($prefix, $postfix) {
74        global $site;
75        $langkey = $site->localetext->getCurrentLanguage();
76        return $prefix . "_" . $langkey . $postfix;
77    }    }
   
 function dprint($message, $level = E_USER_NOTICE) {  
   //debug_append($message, $level);  
   trigger_error($message, $level);  
 }  
   
78    
79  ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

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