Posted by Boobaa on October 20, 2009 at 3:26pm
| Project: | Link |
| Version: | 6.x-2.9 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | jcfiala |
| Status: | closed (fixed) |
Issue Summary
That is, the string between the first occurence of '//' and the first occurence of '/' thereafter. The attached patch provides this.
| Attachment | Size |
|---|---|
| link-host.patch | 673 bytes |
Comments
#1
Reworked the patch to be more simple and (hopefully) even a bit faster.
#2
Oh my goodness, seems like there are still folks out there who use php4... Patch updated accordingly.
#3
checked this patch, 3 simple lines, works as expected
#4
Rerolled patch to make it cleanly apply to 6.x-2.9 (previous one had only offset warnings).
#5
Added some error handling as chx requested.
#6
Hey, keen!
I'm assigning to myself so I'll find an incorporate it the next time I'm adding code to the Link module. (There's really quite a lot of tickets, and it's easy to lose them.)
#7
#8
Coolness - I see chx approves.
I'll be including it either way, but for bonus love from me, create a simpletest test that shows that your token works!
(Of course, you may not want bonus love from me. :)
#9
Here you are.
#10
Downloaded the patch, created a link field containing the token, ran the simpletests - all went as expected. Maybe rename the test from testUserTokenLinkCreate2 to something more descriptive, like testHostTokenLinkCreate?
#11
Here it is.
#12
Looks good
#13
Hello,
Thank you very much for this patch. It worked perfectly but I was wondering if it is possible to remove also the "www" and "com", "net" etc part of the hostname.
Thank you in advance for your help.
Nik
#14
Committed!
#15
Automatically closed -- issue fixed for 2 weeks with no activity.