Sometimes one wants to generate urls like /sites/example.com/files instead of http://example.com/sites/example.com/files.

I'm attaching a patch that sort of fixes this:

Known todos:
1. The default action will remain absolute urls, so as to not break any existing sites. However, I wonder if that's really the desired default. Perhaps one should change the default, and add an update hook to keep old sites functioning until manually changed. Not sure when one would want absolute urls. This needs to be discussed.

2. It really is a fault in the patch that the variable_get is in menu_icons_css_generate(), it should be an argument instead to prevent this from forcing a global setting. I didn't have time to fix that now however.

Comments

acrollet’s picture

Status: Needs review » Fixed

Committed with your suggestion in #1, thanks! http://drupalcode.org/project/menu_icons.git/commit/e261e83

Anyone upgrading and wanting to get the relative URLs will need to set the menu_icons_absolute_links variable to FALSE after running the database update and clear caches. (New installations will generate relative URLs by default)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.