/[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.2 by joko, Thu Dec 19 06:22:09 2002 UTC
# Line 3  Line 3 
3  ##    $Id$  ##    $Id$
4  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
5  ##    $Log$  ##    $Log$
6    ##    Revision 1.2  2002/12/19 06:22:09  joko
7    ##    + function _t
8    ##
9  ##    Revision 1.1  2002/12/13 02:24:55  joko  ##    Revision 1.1  2002/12/13 02:24:55  joko
10  ##    + refactored code  ##    + refactored code
11  ##  ##
# Line 21  Line 24 
24  ##  ##
25  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
26    
27    
28    // TODO:
29    // - try to encapsulate this code and re-export via method-linking to global scope
30    // - is this possible with PHP?
31    
32  // 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?
33    function getlt($key, $tpl=array()) {    function getlt($key, $tpl=array()) {
34      //global $lt;      //global $lt;
# Line 31  Line 39 
39      //print "<br>";      //print "<br>";
40      //return $lt->getlt($key, $tpl);      //return $lt->getlt($key, $tpl);
41      //print "a" . Dumper($site);      //print "a" . Dumper($site);
42      return $site->lt->getlt($key, $tpl);      return $site->localetext->getlt($key, $tpl);
43    }    }
44    
45  // 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 47  Line 55 
55      $site->log($string, $level);      $site->log($string, $level);
56    }    }
57    
58  function dprint($message, $level = E_USER_NOTICE) {    function dprint($message, $level = E_USER_NOTICE) {
59    //debug_append($message, $level);      //debug_append($message, $level);
60    trigger_error($message, $level);      trigger_error($message, $level);
61  }    }
62      
63      function _t($identifier, $data = array()) {
64        global $site;
65        return $site->template->get("lt:$identifier", $data);
66      }
67    
68  ?>  ?>

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

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