|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bkraul Smarty Rookie
Joined: 13 Oct 2011 Posts: 10
|
Posted: Wed Sep 19, 2012 2:26 pm Post subject: Path issues starting with Smarty 3.1.9 - normalizePath() |
|
|
I am trying to figure out the reasoning behind adding of the function normalizePath(), found in smarty_resource.php. From the comments on the function I see that it addresses windows environments, but I don't understand why.
I am having a rather annoying issue in Windows, using an apache server.
Prior to 3.1.9, resource directories such as template_dir would remain as set. Because I develop for Linux environments, I try to use *nix paths all through my application, since Windows can work well like that.
But from 3.1.9, presumably because of this function, my paths are now corrupted. For example, if I set my template_dir to:
when I use {$smarty.current_dir} in my template (stored in /templates/chrome) shows up as:
and it screws up the page because the path, having mixed forward and backward slashes, is not valid in windows. This affects all smarty path variables. Is there any way to turn this off? Maybe a setting to force the / instead of \ ?
Thanks for your help. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Sep 19, 2012 7:55 pm Post subject: |
|
|
Smarty does use the systems directory separator which is '\' under windows.
You can overwrite this by
befor you include Smarty.class.php |
|
Back to top |
|
bkraul Smarty Rookie
Joined: 13 Oct 2011 Posts: 10
|
Posted: Wed Sep 19, 2012 8:00 pm Post subject: |
|
|
You are the man! That did it. Simple enough fix to include in my core include.
Thanks for the fast response. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|