/[cvs]/nfo/php/libs/org.netfrag.flib/Site/Template.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Site/Template.php

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

revision 1.2 by joko, Thu Dec 19 10:33:49 2002 UTC revision 1.4 by joko, Wed Jun 16 22:01:48 2004 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------  //    -------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.4  2004/06/16 22:01:48  joko
7    //    fix due to smarty-update (2.6.3)
8    //
9    //    Revision 1.3  2004/05/13 19:16:45  jonen
10    //    + bugfix related to wrong interpretation of double qoutes at $site->lt->getlt()
11    //
12  //    Revision 1.2  2002/12/19 10:33:49  joko  //    Revision 1.2  2002/12/19 10:33:49  joko
13  //    + debugging and bugfixing  //    + debugging and bugfixing
14  //  //
# Line 33  class Site_Template { Line 39  class Site_Template {
39        "lt",        "lt",
40        array(        array(
41          "db_get_template",          "db_get_template",
         "db_get_timestamp"  
       )  
     );  
 /*  
       array(  
         "db_get_template",  
42          "db_get_timestamp",          "db_get_timestamp",
43          "db_get_secure",          "db_get_secure",
44          "db_get_trusted"          "db_get_trusted"
45        )        )
46  */      );
47    }    }
48    
49    function display($identifier, $options) {    function display($identifier, $options) {
# Line 131  function db_get_template($tpl_name, &$tp Line 131  function db_get_template($tpl_name, &$tp
131    //print "db_get_template: '$tpl_name', '$tpl_source', '$smarty_obj'<br>";    //print "db_get_template: '$tpl_name', '$tpl_source', '$smarty_obj'<br>";
132    //return $this->site->lt->getlt($tpl_name);    //return $this->site->lt->getlt($tpl_name);
133    global $site;    global $site;
134    if ($template = $site->lt->getlt($tpl_name, array(), 1)) {    // WAS: (problems with double qoutes!!)
135  //print "template: '$template'<br>";    //if ($template = $site->lt->getlt($tpl_name, array(), array( 'return' => 1) )) {
136      // IS - 2004-05-13:
137      if ($template = $site->localetext->getlt($tpl_name)) {
138        //print "template: '$template'<br>";
139      $tpl_source = $template;      $tpl_source = $template;
140      return true;      return true;
141    }    }
# Line 144  function db_get_timestamp($tpl_name, &$t Line 147  function db_get_timestamp($tpl_name, &$t
147    return true;    return true;
148  }  }
149    
150    function db_get_secure($tpl_name, &$smarty_obj)
151    {
152        // assume all templates are secure
153        return true;
154    }
155    
156    function db_get_trusted($tpl_name, &$smarty_obj)
157    {
158        // not used for templates
159    }
160    
161  /*  /*
162    
163  // ----------------------------------------------------------------------------------  // ----------------------------------------------------------------------------------
164  // from: http://smarty.php.net/manual/en/templates.from.elsewhere.html  // from: http://smarty.php.net/manual/en/templates.from.elsewhere.php
165    // see also: http://smarty.php.net/manual/en/api.register.resource.php
166  // ----------------------------------------------------------------------------------  // ----------------------------------------------------------------------------------
167    
168    

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

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