Created
May 7, 2011 03:02
-
-
Save matheo/960158 to your computer and use it in GitHub Desktop.
Removed check inside the Smarty folder except for its core 'plugins' on Zikula imtegration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lib/vendor/Smarty/internals/core.assemble_plugin_filepath.php b/src/lib/vendor/Smarty/internals/core.assemble_plugin_filepath.php | |
index 690d3dd..3cab345 100644 | |
--- a/src/lib/vendor/Smarty/internals/core.assemble_plugin_filepath.php | |
+++ b/src/lib/vendor/Smarty/internals/core.assemble_plugin_filepath.php | |
@@ -26,8 +26,15 @@ function smarty_core_assemble_plugin_filepath($params, &$smarty) | |
$_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; | |
- // see if path is relative | |
- if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) { | |
+ // try relative to cwd (or absolute) | |
+ if (@is_readable($_plugin_filepath)) { | |
+ $_return = $_plugin_filepath; | |
+ break; | |
+ } | |
+ | |
+ // ZIKULA MOVE TO AVOID CHECKS INSIDE SMARTY FOLDER ALWAYS | |
+ // BUT ONLY FOR 'plugins' $_plugin_dir | |
+ if ($_plugin_dir == 'plugins') { | |
$_relative_paths[] = $_plugin_dir; | |
// relative path, see if it is in the SMARTY_DIR | |
if (@is_readable(SMARTY_DIR . $_plugin_filepath)) { | |
@@ -35,11 +42,6 @@ function smarty_core_assemble_plugin_filepath($params, &$smarty) | |
break; | |
} | |
} | |
- // try relative to cwd (or absolute) | |
- if (@is_readable($_plugin_filepath)) { | |
- $_return = $_plugin_filepath; | |
- break; | |
- } | |
} | |
if($_return === false) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment