Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorsirlancelot
    • CommentTimeFeb 6th 2008 edited
     # 1
    I'm using the Lussumo Framework library with a project and so far it's excellent! I found one little problem with the GetUrl function in my environment...

    When $Configuration['BASE_URL'] contains a query string, the function still adds a '?' when it generates a query string. I created a patch that will fix this problem while still maintaining all previous functionality. I tested the patched function on a Vanilla 1.1.4 setup and did not find any problems with URL generation.

    Index: Framework.Functions.php
    ===================================================================
    --- Framework.Functions.php (revision 147)
    +++ Framework.Functions.php (working copy)
    @@ -572,9 +572,10 @@
    if ($sReturn != '') $sReturn .= '&';
    $sReturn .= $Querystring;
    }
    - if ($sReturn != '') $sReturn = '?'.$sReturn;
    + $PageName = $Configuration['BASE_URL'].$PageName;
    + if ($sReturn != '') $sReturn = (strrpos($PageName, '?') > 0 ? '&' : '?').$sReturn;
    if ($Querystring != '' && substr($Querystring, 0, 1) == '#') $sReturn .= $Querystring;
    - return $Configuration['BASE_URL'].$PageName.$sReturn;
    + return $PageName.$sReturn;
    }
    }

    One thing to note about this patch is that even though it says it's applied to r146, it should be applied to a revision of the file that has unix line-endings (Wallphone made a commit r145 that converted the file to dos line-endings).

    EDIT: Updated revision number, removed note.
    •  
      CommentAuthorFyorl
    • CommentTimeFeb 7th 2008
     # 2
    Can you not just run dos2unix on the r145 file and then use that?
  1.  # 3
    Framework r147 fixed the line-ending issue.
Add your comments
    Username Password
  • Format comments as