Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

views_dir directory separator

#3

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)

Reported by mattijs · May 26th, 2009 @ 02:16 PM

State: resolved
Assigned to: nobody

Activity

  1. Fabrice Luraine
  2. Fabrice Luraine
    Fabrice Luraine

    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 elsewhere

    echo file_path('/one','two','three');
    echo file_path('/one','two','//three');
    # output will always be /one/two/three
    

    May 28th, 2009 @ 12:04 PM

  3. mattijs
    mattijs

    Good call. Very usefull function

    June 3rd, 2009 @ 02:56 PM

  4. Fabrice Luraine
    Fabrice Luraine

    [milestone:none bulk edit command]

    June 10th, 2009 @ 09:08 AM

  5. Fabrice Luraine
    Fabrice Luraine
    • Milestone set to Release 0.3 - Citronnade

    [milestone:ID#42088 bulk edit command]

    June 10th, 2009 @ 09:08 AM

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.