cvs: smarty / Smarty.class.php
| From: | Monte Ohrt | Date: | Thu, 27 Jun 2002 14:30:43 +0000 |
| Subject: | cvs: smarty / Smarty.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-166@lists.php.net to get a copy of this message | ||
mohrt Thu Jun 27 10:30:43 2002 EDT
Modified files:
/smarty Smarty.class.php
Log:
only loop through relative paths for PHP include_path, remove $_relative variable
Index: smarty/Smarty.class.php
diff -u smarty/Smarty.class.php:1.292 smarty/Smarty.class.php:1.293
--- smarty/Smarty.class.php:1.292 Wed Jun 26 17:17:26 2002
+++ smarty/Smarty.class.php Thu Jun 27 10:30:43 2002
@@ -1674,14 +1674,11 @@
// see if path is relative
if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
- $_relative = true;
+ $_relative_paths[] = $_plugin_dir;
// relative path, see if it is in the SMARTY_DIR
if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
return SMARTY_DIR . $_plugin_filepath;
}
- } else {
- // absolute path
- $_relative = false;
}
// try relative to cwd (or absolute)
if (@is_readable($_plugin_filepath)) {
@@ -1690,8 +1687,8 @@
}
// still not found, try PHP include_path
- if($_relative) {
- foreach ((array)$this->plugins_dir as $_plugin_dir) {
+ if(isset($_relative_paths)) {
+ foreach ((array)$_relative_paths as $_plugin_dir) {
$_plugin_filepath = $_plugin_dir . DIR_SEP . $_plugin_filename;