Last modified: 2007-03-23 17:59:15 UTC
Hi. The thing is that anchor links on diff view have a href like href="/wiki/User:Nux/test#A_section" which is good only on history page and such. When I actually compare two version e.g.: http://test.wikipedia.org/w/index.php?title=User%3ANux%2Ftest&diff=9418&oldid=9417 I would expect a section link to simply point me down to the section and not reload a page to latest version on which this section might have been already removed. The solution would be to simply construct links like this: href="#A_section" If someone actually use those links on pages like village pump, then fixing this bug might actually reduce server load.
Oh and by "section link" I mean something like: "(→A section)"
Linker::formatComment() produces the section autocomment links; since most such are displayed on Recent Changes or history views, the link includes the destination page's full URL. It might be useful to be able to pass another parameter to indicate that the rendered text appears on the page below so a local anchor link can be made.
Created attachment 2555 [details] Patch that does what Brion suggested. Added a $local parameter that trickles down from Linker::revComment -> Linker::commentBlock -> Linker::formatComment. Doesn't break anything on my test wiki, at least!
Committed in r17741, with a modification: the section link in the "old" diff summary may not refer to a valid section (could have been removed in the interim), so the new behavior affects only the "new" diff summary.
(In reply to comment #4) > Committed in r17741, with a modification: the section link in the "old" diff > summary may not refer to a valid section (could have been removed in the > interim), so the new behavior affects only the "new" diff summary. I think you changed it 17742, and applied it to the "old" summary as well.
Correct, I did do that in r17742, I was just too lazy to note it here. :D
*** Bug 5080 has been marked as a duplicate of this bug. ***