cvs: pear /HTML_Template_Flexy Flexy.php

From: Date: Wed, 15 Oct 2003 01:41:52 +0000
Subject: cvs: pear /HTML_Template_Flexy Flexy.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13615@lists.php.net to get a copy of this message
alan_k Tue Oct 14 21:41:52 2003 EDT Modified files: /pear/HTML_Template_Flexy Flexy.php Log: fix support for auto compiling other language templates Index: pear/HTML_Template_Flexy/Flexy.php diff -u pear/HTML_Template_Flexy/Flexy.php:1.46 pear/HTML_Template_Flexy/Flexy.php:1.47 --- pear/HTML_Template_Flexy/Flexy.php:1.46 Tue Oct 14 21:34:15 2003 +++ pear/HTML_Template_Flexy/Flexy.php Tue Oct 14 21:41:52 2003 @@ -51,7 +51,7 @@ * * * -* @version $Id: Flexy.php,v 1.46 2003/10/15 01:34:15 alan_k Exp $ +* @version $Id: Flexy.php,v 1.47 2003/10/15 01:41:52 alan_k Exp $ */ class HTML_Template_Flexy { @@ -365,8 +365,10 @@ $parts = array(); if (preg_match('/(.*)(\.[a-z]+)$/i',$file,$parts)) { $newfile = $parts[1].'.'.$this->options['locale'] .$parts[2]; - if (@file_exists($this->options['templateDir']. DIRECTORY_SEPARATOR .$newfile)) { - $file = $newfile; + foreach ($this->options['templateDir'] as $tmplDir) { + if (@file_exists($tmplDir . DIRECTORY_SEPARATOR .$newfile)) { + $file = $newfile; + } } }

« previous php.pear.cvs (#13615) next »