views_dir directory separator
Reported by mattijs | May 26th, 2009 @ 02:16 PM | in Release 0.3 - Citronnade
The option to set the views dir is dependant on a trailing directory separator. If this separator is forgotten when setting the option view files wont de included properly. The views_dir path and view filename will be concatenated without a directory separator resulting in a path that doesn't exist.
I created a patch to add a check for the directory separator at the end of the views_dir path when redering views. I hope it helps :)
Keep up the good work!
PS: there is a simpler solution by just adding the separator when combining the views_dir and the view into a path. But this won't work on windows when there already is a trailing separator (linux is smart enough to skip the extra separator)
Comments and changes to this ticket
-
Fabrice Luraine May 28th, 2009 @ 11:56 AM
- State changed from new to resolved
(from [cc15bbdf60a1b0f8469e66c1355cd7ed2de7040e]) Normal $view_path in render function [#3 state:resolved] http://github.com/sofadesign/limonade/commit/cc15bbdf60a1b0f8469e66...
-
Fabrice Luraine May 28th, 2009 @ 12:04 PM
Thks for your patch.
After thinking about the different solutions, i decided to add an utility function for making normalized paths, because this can also be usefull elsewhereecho file_path('/one','two','three'); echo file_path('/one','two','//three'); # output will always be /one/two/three
-
Fabrice Luraine June 10th, 2009 @ 09:08 AM
- Milestone set to Release 0.3 - Citronnade
[milestone:ID#42088 bulk edit command]
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Limonade is a PHP micro-framework.
People watching this ticket
Attachments
Referenced by
- 3 views_dir directory separator (from [cc15bbdf60a1b0f8469e66c1355cd7ed2de7040e]) Normal ...