Changeset 105
- Timestamp:
- 03/11/06 13:02:11 (3 years ago)
- Files:
-
- trunk/build/manifests/jtpl-standalone.mn (added)
- trunk/lib/jelix/core/jSelector.class.php (modified) (1 diff)
- trunk/lib/jelix/tpl/jTpl.class.php (modified) (2 diffs)
- trunk/lib/jelix/tpl/jTplCompiler.class.php (modified) (3 diffs)
- trunk/lib/jelix/tpl/jtpl_standalone_prepend.php (added)
- trunk/lib/jelix/tpl/locales (added)
- trunk/lib/jelix/tpl/locales/fr.php (added)
- trunk/Makefile (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/core/jSelector.class.php
r101 r105 306 306 function __construct($sel){ 307 307 $this->_compiler='jTplCompiler'; 308 $this->_compilerPath=JELIX_LIB_ UTILS_PATH.'jTplCompiler.class.php';308 $this->_compilerPath=JELIX_LIB_TPL_PATH.'jTplCompiler.class.php'; 309 309 parent::__construct($sel); 310 310 } trunk/lib/jelix/tpl/jTpl.class.php
r104 r105 2 2 /** 3 3 * @package jelix 4 * @subpackage utils4 * @subpackage jtpl 5 5 * @version $Id$ 6 6 * @author Jouanneau Laurent … … 44 44 } 45 45 } 46 46 #ifndef JTPL_STANDALONE 47 47 function assignZone($name, $zoneName, $params=array()){ 48 48 $this->_vars[$name] = jZone::processZone ($zoneName, $params); 49 49 } 50 #endif 50 51 /* 51 52 function assignStatic($varName, $select){ trunk/lib/jelix/tpl/jTplCompiler.class.php
r104 r105 2 2 /** 3 3 * @package jelix 4 * @subpackage core4 * @subpackage jtpl 5 5 * @version $Id$ 6 6 * @author Jouanneau Laurent 7 * @contributor 7 * @contributor Mathaud Loic (version standalone) 8 8 * @copyright 2005-2006 Jouanneau laurent 9 * @copyright 2006 Mathaud Loic 9 10 * @link http://www.jelix.org 10 11 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 11 12 */ 12 13 13 14 class jTplCompiler implements jISimpleCompiler { 15 14 class jTplCompiler 15 #ifndef JTPL_STANDALONE 16 implements jISimpleCompiler { 17 #else 18 { 19 20 private $_locales; 21 #endif 16 22 private $_literals; 17 23 … … 48 54 $this->_allowedInExpr = array_merge($this->_vartype, $this->_op); 49 55 $this->_allowedAssign = array_merge($this->_vartype, $this->_assignOp, $this->_op); 50 } 51 56 #ifdef JTPL_STANDALONE 57 require_once(JTPL_LOCALES_PATH.$GLOBALS['jTplConfig']['lang'].'.php'); 58 $this->_locales = $GLOBALS['jTplConfig']['locales']; 59 #endif 60 } 61 62 #ifdef JTPL_STANDALONE 63 public function compile($tplFile){ 64 $this->_sourceFile = $tplFile; 65 $cachefile = JTPL_CACHE_PATH . basename($tplFile); 66 67 #else 52 68 public function compile($selector){ 53 69 … … 56 72 57 73 jContext::push($selector->module); 74 #endif 58 75 59 76 if(!file_exists($this->_sourceFile)){ 77 #ifdef JTPL_STANDALONE 78 trigger_error(sprintf($this->_locales['errors.tpl.not.found'], $this->_sourceFile), E_USER_ERROR); 79 #else 60 80 trigger_error(jLocale::get('jelix~errors.tpl.not.found',array($this->_sourceFile)),E_USER_ERROR); 81 #endif 61 82 } 62 83 trunk/Makefile
r89 r105 17 17 DISTJELIX="$(DIST)/jelix-$(LIB_VERSION)" 18 18 DISTHACKER="$(DIST)/jelix-svn" 19 19 DISTJTPL="$(DIST)/jtpl" 20 20 21 21 default: 22 @echo "target: dist-all dist-jelix dist-testapp dist-myapp dev-all dev-jelix dev-myapp dev-testapp "22 @echo "target: dist-all dist-jelix dist-testapp dist-myapp dev-all dev-jelix dev-myapp dev-testapp jtpl" 23 23 24 dist-all: dist-jelix dist-testapp dist-myapp 24 dist-all: dist-jelix dist-testapp dist-myapp jtpl 25 25 26 26 dev-all: dev-jelix dev-myapp dev-testapp … … 58 58 if [ ! -d "$(DISTJELIX)" ] ; then mkdir $(DISTJELIX) ; fi 59 59 if [ ! -d "$(DISTHACKER)" ] ; then mkdir $(DISTHACKER) ; fi 60 if [ ! -d "$(DISTJTPL)" ] ; then mkdir $(DISTJTPL) ; fi 60 61 62 jtpl: common 63 export JTPL_STANDALONE=1 \ 64 && $(PHP) build/mkdist.php build/manifests/jtpl-standalone.mn . $(DISTJTPL) 61 65
